Uast: UastFakeLightMethod dependent generic type SOE fix KT-39155
This commit is contained in:
+16
-1
@@ -10,4 +10,19 @@ private inline fun <reified T> function8(t: T, i: Int, s: String): T = t
|
||||
internal inline fun <reified T> function9(t: T, i: Int, s: String): T = t
|
||||
public inline fun <reified T> function10(t: T, i: Int, s: String): T = t
|
||||
inline fun <reified T> T.function11(t: T, i: Int, s: String): T = t
|
||||
inline fun <reified T : CharSequence> T.function11CharSequence(t: T, i: Int, s: String): T = t
|
||||
inline fun <reified T : CharSequence> T.function11CharSequence(t: T, i: Int, s: String): T = t
|
||||
inline fun <reified T : CharSequence, reified B : T> T.function12CharSequence(t: B, i: T, s: String): B = t
|
||||
|
||||
fun <T, B> copyWhenGreater(list: List<T>, threshold: T, threshold2: B): B
|
||||
where T : CharSequence,
|
||||
T : Comparable<T>,
|
||||
B : T {
|
||||
return threshold2
|
||||
}
|
||||
|
||||
class Foo<T> {
|
||||
inline fun <reified Z : T> foo(): Z {
|
||||
TODO()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,16 @@ UFile (package = )
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
USimpleNameReferenceExpression (identifier = t)
|
||||
UMethod (name = copyWhenGreater)
|
||||
UParameter (name = list)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UParameter (name = threshold)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UParameter (name = threshold2)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
USimpleNameReferenceExpression (identifier = threshold2)
|
||||
UMethod (name = function3)
|
||||
UParameter (name = t)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||
@@ -132,3 +142,22 @@ UFile (package = )
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
USimpleNameReferenceExpression (identifier = t)
|
||||
UMethod (name = function12CharSequence)
|
||||
UParameter (name = $this$function12CharSequence)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UParameter (name = t)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UParameter (name = i)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UParameter (name = s)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
USimpleNameReferenceExpression (identifier = t)
|
||||
UClass (name = Foo)
|
||||
UMethod (name = Foo)
|
||||
UMethod (name = foo)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (TODO))
|
||||
USimpleNameReferenceExpression (identifier = TODO, resolvesTo = null)
|
||||
|
||||
@@ -7,6 +7,9 @@ public final class ReifiedReturnTypeKt {
|
||||
public static final fun function2CharSequence(@org.jetbrains.annotations.NotNull t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : T {
|
||||
return t
|
||||
}
|
||||
public static final fun copyWhenGreater(@org.jetbrains.annotations.NotNull list: java.util.List<? extends T>, @org.jetbrains.annotations.NotNull threshold: T, @org.jetbrains.annotations.NotNull threshold2: B) : B {
|
||||
return threshold2
|
||||
}
|
||||
static fun function3(@org.jetbrains.annotations.Nullable t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : void {
|
||||
}
|
||||
static fun function4(@org.jetbrains.annotations.Nullable t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : T {
|
||||
@@ -36,4 +39,14 @@ public final class ReifiedReturnTypeKt {
|
||||
static fun function11CharSequence(@org.jetbrains.annotations.NotNull $this$function11CharSequence: T, @org.jetbrains.annotations.NotNull t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : T {
|
||||
return t
|
||||
}
|
||||
static fun function12CharSequence(@org.jetbrains.annotations.NotNull $this$function12CharSequence: T, @org.jetbrains.annotations.NotNull t: B, @org.jetbrains.annotations.NotNull i: T, @org.jetbrains.annotations.NotNull s: java.lang.String) : B {
|
||||
return t
|
||||
}
|
||||
}
|
||||
|
||||
public final class Foo {
|
||||
public fun Foo() = UastEmptyExpression
|
||||
fun foo() : Z {
|
||||
TODO()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user