FIR resolve: add extra test for generic with bounds in Java

This commit is contained in:
Mikhail Glukhikh
2019-11-11 17:01:27 +03:00
parent f66b2ca772
commit dde2d08cfc
3 changed files with 35 additions and 0 deletions
@@ -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|
}
}
@@ -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");