Fix AssertionError on overloading function with property in actual class
#KT-22352 Fixed
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
expect class Foo {
|
||||
val bar: String
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
actual class Foo {
|
||||
actual fun bar(): String = ""
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
-- Common --
|
||||
Exit code: OK
|
||||
Output:
|
||||
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/classScopes/functionAndPropertyWithSameName/jvm.kt:3:14: error: actual class 'Foo' has no corresponding members for expected class members:
|
||||
|
||||
public expect final val bar: String
|
||||
|
||||
The following declaration is incompatible because callable kinds are different (function vs property):
|
||||
public final actual fun bar(): String
|
||||
|
||||
actual class Foo {
|
||||
^
|
||||
compiler/testData/multiplatform/classScopes/functionAndPropertyWithSameName/jvm.kt:4:12: error: actual function 'bar' has no corresponding expected declaration
|
||||
The following declaration is incompatible because callable kinds are different (function vs property):
|
||||
public expect final val bar: String
|
||||
|
||||
actual fun bar(): String = ""
|
||||
^
|
||||
Reference in New Issue
Block a user