@@ -855,7 +855,7 @@ object Semantic:
855
855
// init "fake" param fields for parameters of primary and secondary constructors
856
856
def addParamsAsFields (args : List [Value ], ref : Ref , ctorDef : DefDef ) =
857
857
val params = ctorDef.termParamss.flatten.map(_.symbol)
858
- assert(args.size == params.size, " arguments = " + args.size + " , params = " + params.size)
858
+ assert(args.size == params.size, " arguments = " + args.size + " , params = " + params.size + " , ctro = " + ctor.show )
859
859
for (param, value) <- params.zip(args) do
860
860
ref.updateField(param, value)
861
861
printer.println(param.show + " initialized with " + value)
@@ -1663,12 +1663,13 @@ object Semantic:
1663
1663
// term arguments to B. That can only be done in a concrete class.
1664
1664
val tref = typeRefOf(klass.typeRef.baseType(mixin).typeConstructor)
1665
1665
val ctor = tref.classSymbol.primaryConstructor
1666
- if ctor.exists && ctor.paramSymss.isEmpty then
1666
+ if ctor.exists then
1667
1667
// The parameter check of traits comes late in the mixin phase.
1668
- // To avoid crash we ignore the initialization check for erroneous
1669
- // parent call code. See tests/neg/i16438.scala.
1668
+ // To avoid crash we supply hot values for erroneous parent calls.
1669
+ // See tests/neg/i16438.scala.
1670
+ val args : List [ArgInfo ] = ctor.info.paramInfoss.flatten.map(_ => ArgInfo (Hot , Trace .empty))
1670
1671
extendTrace(superParent) {
1671
- superCall(tref, ctor, args = Nil , tasks)
1672
+ superCall(tref, ctor, args, tasks)
1672
1673
}
1673
1674
}
1674
1675
0 commit comments