Do not deserialize type aliases in compatibility mode
When "-language-version 1.0" is specified in command line arguments, the compiler should not be able to see the declarations of type aliases in libraries, because that corresponds to the behavior of the compiler of version 1.0. Note that type aliases are _completely invisible_ in this mode (i.e. "unresolved reference" is reported) because they must not interfere with the classifier resolution
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
import test.*
|
||||
import test.Str
|
||||
|
||||
fun use(
|
||||
str: Str,
|
||||
l: L<Str>,
|
||||
nested: Klass.Nested
|
||||
) {}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/typeAliasesAreInvisibleInCompatibilityMode/main.kt:2:13: error: unresolved reference: Str
|
||||
import test.Str
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/typeAliasesAreInvisibleInCompatibilityMode/main.kt:5:14: error: unresolved reference: Str
|
||||
str: Str,
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/typeAliasesAreInvisibleInCompatibilityMode/main.kt:6:12: error: unresolved reference: L
|
||||
l: L<Str>,
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/typeAliasesAreInvisibleInCompatibilityMode/main.kt:6:14: error: unresolved reference: Str
|
||||
l: L<Str>,
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/typeAliasesAreInvisibleInCompatibilityMode/main.kt:7:23: error: unresolved reference: Nested
|
||||
nested: Klass.Nested
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package test
|
||||
|
||||
typealias Str = String
|
||||
typealias L<T> = List<T>
|
||||
|
||||
class Klass {
|
||||
typealias Nested = Z
|
||||
|
||||
class Z
|
||||
}
|
||||
Reference in New Issue
Block a user