FIR resolve: add extra test for generic with bounds in Java
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// FILE: LookupElement.java
|
||||
|
||||
public abstract class LookupElement {
|
||||
public abstract String getLookupString();
|
||||
}
|
||||
|
||||
// FILE: Decorator.java
|
||||
|
||||
public abstract class Decorator<T extends LookupElement> extends LookupElement {
|
||||
public T getDelegate() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
class MyDecorator : Decorator<LookupElement> {
|
||||
override fun getLookupString(): String = delegate.lookupString
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
FILE: test.kt
|
||||
public final class MyDecorator : R|Decorator<LookupElement>| {
|
||||
public constructor(): R|MyDecorator| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final override fun getLookupString(): R|kotlin/String| {
|
||||
^getLookupString R|/Decorator.delegate|.R|/LookupElement.lookupString|
|
||||
}
|
||||
|
||||
}
|
||||
+5
@@ -359,6 +359,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
|
||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/extensionPropertyInLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericDecorator.kt")
|
||||
public void testGenericDecorator() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/genericDecorator.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericPropertyAccess.kt")
|
||||
public void testGenericPropertyAccess() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/genericPropertyAccess.kt");
|
||||
|
||||
Reference in New Issue
Block a user