Check platform<->impl compatibility for class members
When matching platform and impl classifiers, ensure that each declaration from the platform class scope is present in the impl class scope. Note that the presence of the 'impl' modifier is not checked yet
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
platform class Foo(param: String) {
|
||||
var property: Int
|
||||
|
||||
fun <T> function(p: List<T>): T
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
impl class Foo impl constructor(param: String) {
|
||||
impl var property: Int = param.length
|
||||
|
||||
impl fun <T> function(p: List<T>): T = p.first()
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
-- Common --
|
||||
Exit code: OK
|
||||
Output:
|
||||
|
||||
-- JVM --
|
||||
Exit code: OK
|
||||
Output:
|
||||
|
||||
Reference in New Issue
Block a user