[FIR] Ignore error declarations in conflict checking
This commit is contained in:
committed by
Space Team
parent
4c6b6dd700
commit
9e34a5ad82
+2
@@ -64,6 +64,8 @@ FILE: conflictingOverloads.kt
|
||||
public get(): R|kotlin/Int|
|
||||
public final val u: R|kotlin/Int| = Int(20)
|
||||
public get(): R|kotlin/Int|
|
||||
<ERROR PROPERTY: Destructuring declarations are only allowed for local variables/values>
|
||||
<ERROR PROPERTY: Destructuring declarations are only allowed for local variables/values>
|
||||
public final typealias TA = R|A|
|
||||
public final typealias TA = R|B|
|
||||
public final typealias BA = R|A|
|
||||
|
||||
+3
@@ -33,6 +33,9 @@ enum class <!PACKAGE_OR_CLASSIFIER_REDECLARATION!>B<!>
|
||||
val <!REDECLARATION!>u<!> = 10
|
||||
val <!REDECLARATION!>u<!> = 20
|
||||
|
||||
val <!SYNTAX!>(a,b)<!> = 30 to 40
|
||||
val <!SYNTAX!>(c,d)<!> = 50 to 60
|
||||
|
||||
typealias <!PACKAGE_OR_CLASSIFIER_REDECLARATION!>TA<!> = A
|
||||
typealias <!PACKAGE_OR_CLASSIFIER_REDECLARATION!>TA<!> = B
|
||||
|
||||
|
||||
+3
@@ -37,6 +37,9 @@ enum class <!PACKAGE_OR_CLASSIFIER_REDECLARATION!>B<!>
|
||||
val <!REDECLARATION!>u<!> = 10
|
||||
val <!REDECLARATION!>u<!> = 20
|
||||
|
||||
val <!SYNTAX!>(a,b)<!> = 30 to 40
|
||||
val <!SYNTAX!>(c,d)<!> = 50 to 60
|
||||
|
||||
typealias <!PACKAGE_OR_CLASSIFIER_REDECLARATION!>TA<!> = A
|
||||
typealias <!PACKAGE_OR_CLASSIFIER_REDECLARATION!>TA<!> = B
|
||||
|
||||
|
||||
+1
@@ -77,6 +77,7 @@ object FirConflictsDeclarationChecker : FirBasicDeclarationChecker() {
|
||||
FirPackageMemberScope(file.packageFqName, context.sessionHolder.session)
|
||||
}
|
||||
for (topLevelDeclaration in file.declarations) {
|
||||
if (topLevelDeclaration is FirErrorProperty || topLevelDeclaration is FirErrorFunction) continue
|
||||
inspector.collectWithExternalConflicts(topLevelDeclaration, file, context.session, packageMemberScope)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user