FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Restore enum class exclusion from constructor default parameters · github/codeql@39520e5 · GitHub

/ codeql Public

Commit 39520e5

Browse files
committed
Restore enum class exclusion from constructor default parameters
1 parent 4910bf1 commit 39520e5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3065,7 +3065,7 @@ open class KotlinFileExtractor(
30653065
val valueArgs = (0 until e.valueArgumentsCount).map { e.getValueArgument(it) }
30663066
// For now, don't try to use default methods for enum constructor calls,
30673067
// which have null arguments even though the parameters don't give default values.
3068-
val id = if (callUsesDefaultArguments(e.symbol.owner, valueArgs)) {
3068+
val id = if (e !is IrEnumConstructorCall && callUsesDefaultArguments(e.symbol.owner, valueArgs)) {
30693069
extractNewExpr(getDefaultsMethodLabel(e.symbol.owner).cast(), type, locId, parent, idx, callable, enclosingStmt).also {
30703070
extractDefaultsCallArguments(it, e.symbol.owner, callable, enclosingStmt, valueArgs, null, null)
30713071
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL