[FIR] Introduce FirDeclarationStatus.hasStableParameterNames
This flag is true by default but is set to false for - Java methods and constructors - interface delegation methods that delegate to Java The NAMED_ARGUMENTS_NOT_ALLOWED logic is mostly refactored to use the new flag though some custom logic remains for determining the correct message and to work around a corner case with fake overrides. The flag is (de)serialized from/to metadata. For backward compatibility with K1, delegated methods to Java types are deserialized as stable. ^KT-40480 Fixed
This commit is contained in:
committed by
Space Team
parent
152e63b198
commit
314784f435
+1
-1
@@ -382,7 +382,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
||||
generateBooleanFields(
|
||||
"expect", "actual", "override", "operator", "infix", "inline", "tailRec",
|
||||
"external", "const", "lateInit", "inner", "companion", "data", "suspend", "static",
|
||||
"fromSealedClass", "fromEnumClass", "fun"
|
||||
"fromSealedClass", "fromEnumClass", "fun", "hasStableParameterNames",
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ abstract class AbstractFieldConfigurator<T : AbstractFirTreeBuilder>(private val
|
||||
|
||||
fun generateBooleanFields(vararg names: String) {
|
||||
names.forEach {
|
||||
+booleanField("is${it.replaceFirstChar(Char::uppercaseChar)}")
|
||||
+booleanField(if (it.startsWith("is") || it.startsWith("has")) it else "is${it.replaceFirstChar(Char::uppercaseChar)}")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user