mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 08:31:26 +00:00
Introduction of CastedClassReceiver and its handling in codegen #KT-6744 Fixed
ClassReceiver converted to Kotlin Also #KT-7617 Fixed
This commit is contained in:
15
compiler/testData/codegen/bytecodeText/falseSmartCast.kt
vendored
Normal file
15
compiler/testData/codegen/bytecodeText/falseSmartCast.kt
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
open class SuperFoo {
|
||||
public fun bar() {
|
||||
if (this is Foo) {
|
||||
baz()
|
||||
}
|
||||
}
|
||||
|
||||
public fun baz() {}
|
||||
}
|
||||
|
||||
class Foo : SuperFoo()
|
||||
|
||||
// 0 INVOKEVIRTUAL SuperFoo.baz
|
||||
// 1 CHECKCAST Foo
|
||||
// 1 INVOKEVIRTUAL Foo.baz
|
||||
Reference in New Issue
Block a user