File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
compiler/src/dotty/tools/dotc/core/classfile Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -271,9 +271,14 @@ class ClassfileParser(
271271 * and make constructor type polymorphic in the type parameters of the class
272272 */
273273 def normalizeConstructorInfo () = {
274- val mt @ MethodType (paramNames) = denot.info
275274 val rt = classRoot.typeRef appliedTo (classRoot.typeParams map (_.typeRef))
276- denot.info = mt.derivedLambdaType(paramNames, mt.paramInfos, rt)
275+
276+ def resultType (tpe : Type ): Type = tpe match {
277+ case mt @ MethodType (paramNames) => mt.derivedLambdaType(paramNames, mt.paramInfos, rt)
278+ case pt : PolyType => pt.derivedLambdaType(pt.paramNames, pt.paramInfos, resultType(pt.resType))
279+ }
280+
281+ denot.info = resultType(denot.info)
277282 addConstructorTypeParams(denot)
278283 }
279284
You can’t perform that action at this time.
0 commit comments