mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 00:21:26 +00:00
Support class reference expression for reified type parameters
Also make KClass::java an intrinsic property. Based on the work by @dnpetrov #KT-6976 Fixed
This commit is contained in:
16
compiler/testData/codegen/bytecodeText/javaExtensionPropertyIntrinsic.kt
vendored
Normal file
16
compiler/testData/codegen/bytecodeText/javaExtensionPropertyIntrinsic.kt
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import kotlin.reflect.jvm.java
|
||||
|
||||
class Klass
|
||||
|
||||
fun foo() {
|
||||
val c0 = (Klass::class).java // prevent intrinsic .java for class literal
|
||||
val c1 = Klass::class.java
|
||||
val c2 = Int::class.java
|
||||
val c3 = Integer::class.java
|
||||
|
||||
}
|
||||
|
||||
// 2 LDC LKlass;.class
|
||||
// 1 GETSTATIC java/lang/Integer.TYPE : Ljava/lang/Class;
|
||||
// 1 INVOKESTATIC kotlin/reflect/jvm.*\.getJava
|
||||
// 1 LDC Ljava/lang/Integer;.class
|
||||
Reference in New Issue
Block a user