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:
+3
@@ -17,5 +17,8 @@
|
||||
package org.jetbrains.kotlin.serialization.deserialization
|
||||
|
||||
interface DeserializationConfiguration {
|
||||
val typeAliasesAllowed: Boolean
|
||||
get() = true
|
||||
|
||||
object Default : DeserializationConfiguration
|
||||
}
|
||||
|
||||
+3
-1
@@ -51,7 +51,9 @@ abstract class DeserializedMemberScope protected constructor(
|
||||
}
|
||||
private val typeAliasProtos by
|
||||
c.storageManager.createLazyValue {
|
||||
typeAliasList.groupByName { it.name }
|
||||
if (c.components.configuration.typeAliasesAllowed)
|
||||
typeAliasList.groupByName { it.name }
|
||||
else emptyMap()
|
||||
}
|
||||
|
||||
private val functions =
|
||||
|
||||
Reference in New Issue
Block a user