Get type arguments for property/function references

This commit is contained in:
Tamas Vajk
2022-02-24 16:04:15 +01:00
committed by Ian Lynagh
parent 4b55dce0e9
commit 6742496fe3
3 changed files with 65 additions and 60 deletions

View File

@@ -136,7 +136,7 @@ reflection.kt:
# 12| 6: [LocalVariableDeclStmt] var ...;
# 12| 1: [LocalVariableDeclExpr] x4
# 12| 0: [MemberRefExpr] ...::...
# 12| -4: [AnonymousClass] new Function1<T,V>(...) { ... }
# 12| -4: [AnonymousClass] new Function1<C,Integer>(...) { ... }
# 12| 1: [Constructor]
#-----| 4: (Parameters)
# 12| 0: [Parameter] <dispatchReceiver>
@@ -158,7 +158,7 @@ reflection.kt:
# 12| 0: [VarAccess] a0
# 12| 1: [FieldDeclaration] KProperty1<C,Integer> <dispatchReceiver>;
# 12| -1: [TypeAccess] KProperty1<C,Integer>
# 12| -3: [TypeAccess] Function1<T,V>
# 12| -3: [TypeAccess] Function1<C,Integer>
# 12| 0: [VarAccess] x0
# 13| 7: [LocalVariableDeclStmt] var ...;
# 13| 1: [LocalVariableDeclExpr] x5
@@ -227,7 +227,7 @@ reflection.kt:
# 19| 12: [LocalVariableDeclStmt] var ...;
# 19| 1: [LocalVariableDeclExpr] y4
# 19| 0: [MemberRefExpr] ...::...
# 19| -4: [AnonymousClass] new Function2<T,V,Unit>(...) { ... }
# 19| -4: [AnonymousClass] new Function2<C,Integer,Unit>(...) { ... }
# 19| 1: [Constructor]
#-----| 4: (Parameters)
# 19| 0: [Parameter] <dispatchReceiver>
@@ -251,7 +251,7 @@ reflection.kt:
# 19| 1: [VarAccess] a1
# 19| 1: [FieldDeclaration] KMutableProperty1<C,Integer> <dispatchReceiver>;
# 19| -1: [TypeAccess] KMutableProperty1<C,Integer>
# 19| -3: [TypeAccess] Function2<T,V,Unit>
# 19| -3: [TypeAccess] Function2<C,Integer,Unit>
# 19| 0: [VarAccess] y0
# 20| 13: [LocalVariableDeclStmt] var ...;
# 20| 1: [LocalVariableDeclExpr] y5
@@ -397,7 +397,7 @@ reflection.kt:
# 58| 0: [MethodAccess] println(...)
# 58| -1: [TypeAccess] ConsoleKt
# 58| 0: [MemberRefExpr] ...::...
# 58| -4: [AnonymousClass] new Function2<Generic<T1>,T1,String>(...) { ... }
# 58| -4: [AnonymousClass] new Function2<Generic<Integer>,Integer,String>(...) { ... }
# 58| 1: [Constructor]
# 58| 5: [BlockStmt] { ... }
# 58| 0: [SuperConstructorInvocationStmt] super(...)
@@ -410,12 +410,12 @@ reflection.kt:
# 58| 0: [MethodAccess] m1(...)
# 58| -1: [VarAccess] a0
# 58| 0: [VarAccess] a1
# 58| -3: [TypeAccess] Function2<Generic<T1>,T1,String>
# 58| -3: [TypeAccess] Function2<Generic<Integer>,Integer,String>
# 59| 1: [ExprStmt] <Expr>;
# 59| 0: [MethodAccess] println(...)
# 59| -1: [TypeAccess] ConsoleKt
# 59| 0: [MemberRefExpr] ...::...
# 59| -4: [AnonymousClass] new Function1<T1,String>(...) { ... }
# 59| -4: [AnonymousClass] new Function1<Integer,String>(...) { ... }
# 59| 1: [Constructor]
#-----| 4: (Parameters)
# 59| 0: [Parameter] <dispatchReceiver>
@@ -437,7 +437,7 @@ reflection.kt:
# 59| 0: [VarAccess] a0
# 59| 1: [FieldDeclaration] Generic<Integer> <dispatchReceiver>;
# 59| -1: [TypeAccess] Generic<Integer>
# 59| -3: [TypeAccess] Function1<T1,String>
# 59| -3: [TypeAccess] Function1<Integer,String>
# 59| 0: [ClassInstanceExpr] new Generic<Integer>(...)
# 59| -3: [TypeAccess] Generic<Integer>
# 59| 0: [TypeAccess] Integer
@@ -445,7 +445,7 @@ reflection.kt:
# 60| 0: [MethodAccess] println(...)
# 60| -1: [TypeAccess] ConsoleKt
# 60| 0: [MemberRefExpr] ...::...
# 60| -4: [AnonymousClass] new Function1<Generic<T2>,String>(...) { ... }
# 60| -4: [AnonymousClass] new Function1<Generic<Integer>,String>(...) { ... }
# 60| 1: [Constructor]
# 60| 5: [BlockStmt] { ... }
# 60| 0: [SuperConstructorInvocationStmt] super(...)
@@ -457,7 +457,7 @@ reflection.kt:
# 60| 0: [MethodAccess] ext1(...)
# 60| -2: [TypeAccess] Integer
# 60| 0: [VarAccess] a0
# 60| -3: [TypeAccess] Function1<Generic<T2>,String>
# 60| -3: [TypeAccess] Function1<Generic<Integer>,String>
# 61| 3: [ExprStmt] <Expr>;
# 61| 0: [MethodAccess] println(...)
# 61| -1: [TypeAccess] ConsoleKt

View File

@@ -5,16 +5,16 @@ variableInitializerType
| reflection.kt:8:9:8:42 | KProperty1<C,Integer> x0 | file://<external>/KProperty1.class:0:0:0:0 | KProperty1<C,Integer> | reflection.kt:8:38:8:42 | new KProperty1<C,Integer>(...) { ... } | file://<external>/PropertyReference.class:0:0:0:0 | PropertyReference | true |
| reflection.kt:11:9:11:53 | Getter<C,Integer> x3 | file://<external>/KProperty1$Getter.class:0:0:0:0 | Getter<C,Integer> | file://<external>/KProperty1$Getter.class:0:0:0:0 | Getter<C,Integer> | file://<external>/Function1.class:0:0:0:0 | Function1<C,Integer> | true |
| reflection.kt:11:9:11:53 | Getter<C,Integer> x3 | file://<external>/KProperty1$Getter.class:0:0:0:0 | Getter<C,Integer> | file://<external>/KProperty1$Getter.class:0:0:0:0 | Getter<C,Integer> | file://<external>/KProperty$Getter.class:0:0:0:0 | Getter<Integer> | true |
| reflection.kt:12:9:12:44 | KFunction<Integer> x4 | file://<external>/KFunction.class:0:0:0:0 | KFunction<Integer> | reflection.kt:12:38:12:44 | new Function1<T,V>(...) { ... } | file://<external>/Function1.class:0:0:0:0 | Function1<T,V> | true |
| reflection.kt:12:9:12:44 | KFunction<Integer> x4 | file://<external>/KFunction.class:0:0:0:0 | KFunction<Integer> | reflection.kt:12:38:12:44 | new Function1<T,V>(...) { ... } | file://<external>/FunctionReference.class:0:0:0:0 | FunctionReference | true |
| reflection.kt:12:9:12:44 | KFunction<Integer> x4 | file://<external>/KFunction.class:0:0:0:0 | KFunction<Integer> | reflection.kt:12:38:12:44 | new Function1<C,Integer>(...) { ... } | file://<external>/Function1.class:0:0:0:0 | Function1<C,Integer> | true |
| reflection.kt:12:9:12:44 | KFunction<Integer> x4 | file://<external>/KFunction.class:0:0:0:0 | KFunction<Integer> | reflection.kt:12:38:12:44 | new Function1<C,Integer>(...) { ... } | file://<external>/FunctionReference.class:0:0:0:0 | FunctionReference | true |
| reflection.kt:13:9:13:41 | KProperty0<Integer> x5 | file://<external>/KProperty0.class:0:0:0:0 | KProperty0<Integer> | reflection.kt:13:35:13:41 | new KProperty0<Integer>(...) { ... } | file://<external>/KProperty0.class:0:0:0:0 | KProperty0<Integer> | true |
| reflection.kt:13:9:13:41 | KProperty0<Integer> x5 | file://<external>/KProperty0.class:0:0:0:0 | KProperty0<Integer> | reflection.kt:13:35:13:41 | new KProperty0<Integer>(...) { ... } | file://<external>/PropertyReference.class:0:0:0:0 | PropertyReference | true |
| reflection.kt:15:9:15:49 | KMutableProperty1<C,Integer> y0 | file://<external>/KMutableProperty1.class:0:0:0:0 | KMutableProperty1<C,Integer> | reflection.kt:15:45:15:49 | new KMutableProperty1<C,Integer>(...) { ... } | file://<external>/KMutableProperty1.class:0:0:0:0 | KMutableProperty1<C,Integer> | true |
| reflection.kt:15:9:15:49 | KMutableProperty1<C,Integer> y0 | file://<external>/KMutableProperty1.class:0:0:0:0 | KMutableProperty1<C,Integer> | reflection.kt:15:45:15:49 | new KMutableProperty1<C,Integer>(...) { ... } | file://<external>/PropertyReference.class:0:0:0:0 | PropertyReference | true |
| reflection.kt:18:9:18:60 | Setter<C,Integer> y3 | file://<external>/KMutableProperty1$Setter.class:0:0:0:0 | Setter<C,Integer> | file://<external>/KMutableProperty1$Setter.class:0:0:0:0 | Setter<C,Integer> | file://<external>/Function2.class:0:0:0:0 | Function2<C,Integer,Unit> | true |
| reflection.kt:18:9:18:60 | Setter<C,Integer> y3 | file://<external>/KMutableProperty1$Setter.class:0:0:0:0 | Setter<C,Integer> | file://<external>/KMutableProperty1$Setter.class:0:0:0:0 | Setter<C,Integer> | file://<external>/KMutableProperty$Setter.class:0:0:0:0 | Setter<Integer> | true |
| reflection.kt:19:9:19:50 | KFunction<Unit> y4 | file://<external>/KFunction.class:0:0:0:0 | KFunction<Unit> | reflection.kt:19:44:19:50 | new Function2<T,V,Unit>(...) { ... } | file://<external>/Function2.class:0:0:0:0 | Function2<T,V,Unit> | true |
| reflection.kt:19:9:19:50 | KFunction<Unit> y4 | file://<external>/KFunction.class:0:0:0:0 | KFunction<Unit> | reflection.kt:19:44:19:50 | new Function2<T,V,Unit>(...) { ... } | file://<external>/FunctionReference.class:0:0:0:0 | FunctionReference | true |
| reflection.kt:19:9:19:50 | KFunction<Unit> y4 | file://<external>/KFunction.class:0:0:0:0 | KFunction<Unit> | reflection.kt:19:44:19:50 | new Function2<C,Integer,Unit>(...) { ... } | file://<external>/Function2.class:0:0:0:0 | Function2<C,Integer,Unit> | true |
| reflection.kt:19:9:19:50 | KFunction<Unit> y4 | file://<external>/KFunction.class:0:0:0:0 | KFunction<Unit> | reflection.kt:19:44:19:50 | new Function2<C,Integer,Unit>(...) { ... } | file://<external>/FunctionReference.class:0:0:0:0 | FunctionReference | true |
| reflection.kt:20:9:20:48 | KMutableProperty0<Integer> y5 | file://<external>/KMutableProperty0.class:0:0:0:0 | KMutableProperty0<Integer> | reflection.kt:20:42:20:48 | new KMutableProperty0<Integer>(...) { ... } | file://<external>/KMutableProperty0.class:0:0:0:0 | KMutableProperty0<Integer> | true |
| reflection.kt:20:9:20:48 | KMutableProperty0<Integer> y5 | file://<external>/KMutableProperty0.class:0:0:0:0 | KMutableProperty0<Integer> | reflection.kt:20:42:20:48 | new KMutableProperty0<Integer>(...) { ... } | file://<external>/PropertyReference.class:0:0:0:0 | PropertyReference | true |
| reflection.kt:22:9:22:91 | KProperty2<C,Integer,Integer> prop | file://<external>/KProperty2.class:0:0:0:0 | KProperty2<C,Integer,Integer> | file://<external>/KProperty2.class:0:0:0:0 | KProperty2<C,Integer,Integer> | file://<external>/Function2.class:0:0:0:0 | Function2<C,Integer,Integer> | true |