KT-14282 No error on unused type alias with -language-version 1.0
Always resolve descriptors for type aliases.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
-language-version
|
||||
1.0
|
||||
$TESTDATA_DIR$/unsupportedTypeAlias.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
typealias Unused = String
|
||||
@@ -0,0 +1,4 @@
|
||||
compiler/testData/cli/jvm/unsupportedTypeAlias.kt:3:1: error: the feature is only available since Kotlin 1.1: type aliases
|
||||
typealias Unused = String
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
@@ -2,12 +2,13 @@
|
||||
|
||||
class C
|
||||
|
||||
<!UNSUPPORTED_TYPEALIAS!>typealias<!> S = String
|
||||
<!UNSUPPORTED_TYPEALIAS!>typealias<!> L<T> = List<T>
|
||||
<!UNSUPPORTED_TYPEALIAS!>typealias<!> CA = C
|
||||
<!UNSUPPORTED_FEATURE!>typealias<!> S = String
|
||||
<!UNSUPPORTED_FEATURE!>typealias<!> L<T> = List<T>
|
||||
<!UNSUPPORTED_FEATURE!>typealias<!> CA = C
|
||||
<!UNSUPPORTED_FEATURE!>typealias<!> Unused = Any
|
||||
|
||||
val test1: <!UNSUPPORTED_TYPEALIAS!>S<!> = ""
|
||||
val test1: <!UNSUPPORTED_FEATURE!>S<!> = ""
|
||||
|
||||
fun test2(x: <!UNSUPPORTED_TYPEALIAS!>L<<!UNSUPPORTED_TYPEALIAS!>S<!>><!>) = <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!>
|
||||
fun test2(x: <!UNSUPPORTED_FEATURE!>L<<!UNSUPPORTED_FEATURE!>S<!>><!>) = <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!>
|
||||
|
||||
class Test3 : <!UNSUPPORTED_TYPEALIAS!>CA<!>()
|
||||
class Test3 : <!UNSUPPORTED_FEATURE!>CA<!>()
|
||||
@@ -19,3 +19,4 @@ public final class Test3 {
|
||||
public typealias CA = [ERROR : CA]
|
||||
public typealias L</*0*/ T> = [ERROR : L]
|
||||
public typealias S = [ERROR : S]
|
||||
public typealias Unused = [ERROR : Unused]
|
||||
|
||||
Reference in New Issue
Block a user