mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
Create from Usage: Do not add bodies to expect class members
#KT-21122 Fixed
This commit is contained in:
12
idea/testData/multiModuleQuickFix/createValInExpectClass/header/header.kt
vendored
Normal file
12
idea/testData/multiModuleQuickFix/createValInExpectClass/header/header.kt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
// "Create member property 'Foo.foo'" "true"
|
||||
// ERROR: Unresolved reference: foo
|
||||
|
||||
expect class Foo
|
||||
|
||||
fun test(f: Foo) {
|
||||
takeInt(f.<caret>foo)
|
||||
}
|
||||
|
||||
fun takeInt(n: Int) {
|
||||
|
||||
}
|
||||
14
idea/testData/multiModuleQuickFix/createValInExpectClass/header/header.kt.after
vendored
Normal file
14
idea/testData/multiModuleQuickFix/createValInExpectClass/header/header.kt.after
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// "Create member property 'Foo.foo'" "true"
|
||||
// ERROR: Unresolved reference: foo
|
||||
|
||||
expect class Foo {
|
||||
val foo: Int
|
||||
}
|
||||
|
||||
fun test(f: Foo) {
|
||||
takeInt(f.foo)
|
||||
}
|
||||
|
||||
fun takeInt(n: Int) {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user