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:
+5
-1
@@ -16,7 +16,11 @@
|
||||
|
||||
package org.jetbrains.kotlin.resolve
|
||||
|
||||
import org.jetbrains.kotlin.config.LanguageFeature
|
||||
import org.jetbrains.kotlin.config.LanguageVersionSettings
|
||||
import org.jetbrains.kotlin.serialization.deserialization.DeserializationConfiguration
|
||||
|
||||
class CompilerDeserializationConfiguration(private val languageVersionSettings: LanguageVersionSettings) : DeserializationConfiguration
|
||||
class CompilerDeserializationConfiguration(private val languageVersionSettings: LanguageVersionSettings) : DeserializationConfiguration {
|
||||
override val typeAliasesAllowed: Boolean
|
||||
get() = languageVersionSettings.supportsFeature(LanguageFeature.TypeAliases)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user