Update typing rules for class literal expressions.
C::class : KClass<C> expr: T => expr::class : KClass<out T> NB: this means Obj::class : KClass<out Obj> for object Obj.
This commit is contained in:
@@ -2998,6 +2998,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("classAndObjectLiteralType.kt")
|
||||
public void testClassAndObjectLiteralType() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/classAndObjectLiteralType.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("classLiteralType.kt")
|
||||
public void testClassLiteralType() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/classLiteralType.kt");
|
||||
|
||||
Reference in New Issue
Block a user