[FIR] KT-55552: Ensure type mismatch is missing
This commit is contained in:
committed by
Space Team
parent
56f977f70c
commit
81d955a712
@@ -0,0 +1,13 @@
|
||||
// ISSUE: KT-55552
|
||||
|
||||
interface B2 {
|
||||
fun d()
|
||||
}
|
||||
|
||||
class B
|
||||
|
||||
open class C(b: B) : B2 by b {} //no error in K2, K1 - [TYPE_MISMATCH] Type mismatch: inferred type is B but B2 was expected
|
||||
|
||||
fun main() {
|
||||
val c = C(B()).d() //runtime AbstractMethodError
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// ISSUE: KT-55552
|
||||
|
||||
interface B2 {
|
||||
fun d()
|
||||
}
|
||||
|
||||
class B
|
||||
|
||||
open class C(b: B) : B2 by <!TYPE_MISMATCH!>b<!> {} //no error in K2, K1 - [TYPE_MISMATCH] Type mismatch: inferred type is B but B2 was expected
|
||||
|
||||
fun main() {
|
||||
val c = C(B()).d() //runtime AbstractMethodError
|
||||
}
|
||||
Reference in New Issue
Block a user