You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Kotlin: phantom <init>() for classes with only secondary constructors #1063
Expected: Two constructor definitions with the signatures (s: String) and (i: Int), and no no-arg constructor.
Actual: A phantom Secondary#<init>(). definition is emitted at the class name. The String constructor gets the same symbol, and the phantom's no-arg signature wins.
Cause:KotlinAnalysisIndexer.kt synthesizes an implicit constructor whenever primaryConstructor == null, without checking for secondary constructors.
Fix: Skip the implicit constructor when secondary constructors exist, and add a snapshot test.
Activity