Approximate captured types only when necessary
This commit is contained in:
@@ -39,11 +39,6 @@ public class FunctionDescriptorUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FunctionDescriptorUtil.MAKE_TYPE_PARAMETERS_FRESH";
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class Bar
|
||||
|
||||
fun Bar.foo() = 42
|
||||
|
||||
object MyObject {
|
||||
fun foo(bar: Bar) = bar.foo()
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package
|
||||
|
||||
internal fun Bar.foo(): kotlin.Int
|
||||
|
||||
internal final class Bar {
|
||||
public constructor Bar()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
internal object MyObject {
|
||||
private constructor MyObject()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal final fun foo(/*0*/ bar: Bar): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public class object <class-object-for-MyObject> : MyObject {
|
||||
private constructor <class-object-for-MyObject>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal final override /*1*/ /*fake_override*/ fun foo(/*0*/ bar: Bar): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
@@ -5208,6 +5208,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("notApproximateWhenCopyDescriptors.kt")
|
||||
public void testNotApproximateWhenCopyDescriptors() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/notApproximateWhenCopyDescriptors.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("overApproximationForInCaptured.kt")
|
||||
public void testOverApproximationForInCaptured() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/overApproximationForInCaptured.kt");
|
||||
|
||||
Reference in New Issue
Block a user