KMP: Put "prohbit actual typealias to Nothing and Nullable" under the flag

^KT-61668 Fixed

Review: https://jetbrains.team/p/kt/reviews/12062/timeline
This commit is contained in:
Nikita Bobko
2023-09-05 16:57:16 +02:00
committed by Space Team
parent 141bc9cac9
commit 0922833b46
8 changed files with 98 additions and 14 deletions
@@ -191,14 +191,16 @@ class DeclarationsChecker(
return
}
if (rhs.isNothing()) {
trace.report(ACTUAL_TYPE_ALIAS_TO_NOTHING.on(declaration))
return
}
if (languageVersionSettings.supportsFeature(LanguageFeature.MultiplatformRestrictions)) {
if (rhs.isNothing()) {
trace.report(ACTUAL_TYPE_ALIAS_TO_NOTHING.on(declaration))
return
}
if (rhs.isMarkedNullable) {
trace.report(ACTUAL_TYPE_ALIAS_TO_NULLABLE_TYPE.on(declaration))
return
if (rhs.isMarkedNullable) {
trace.report(ACTUAL_TYPE_ALIAS_TO_NULLABLE_TYPE.on(declaration))
return
}
}
}