Tests for type alias diagnostics: type projections in type alias constructor
(should report same errors as for classes)
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
class In<in T>(val x: Any)
|
||||
|
||||
typealias InAlias<T> = In<T>
|
||||
|
||||
val test1 = In<<!PROJECTION_ON_NON_CLASS_TYPE_ARGUMENT!>out<!> String>("")
|
||||
val test2 = InAlias<<!PROJECTION_ON_NON_CLASS_TYPE_ARGUMENT!>out<!> String>("")
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package
|
||||
|
||||
public typealias InAlias</*0*/ T> = In<T>
|
||||
public val test1: In<kotlin.String>
|
||||
public val test2: In<kotlin.String>
|
||||
|
||||
public final class In</*0*/ in T> {
|
||||
public constructor In</*0*/ in T>(/*0*/ x: kotlin.Any)
|
||||
public final val x: kotlin.Any
|
||||
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
|
||||
}
|
||||
@@ -19521,6 +19521,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("projectionsInTypeAliasConstructor.kt")
|
||||
public void testProjectionsInTypeAliasConstructor() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/projectionsInTypeAliasConstructor.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("recursive.kt")
|
||||
public void testRecursive() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/recursive.kt");
|
||||
|
||||
Reference in New Issue
Block a user