We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d74a18a commit 40edbd0Copy full SHA for 40edbd0
compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
@@ -271,9 +271,14 @@ class ClassfileParser(
271
* and make constructor type polymorphic in the type parameters of the class
272
*/
273
def normalizeConstructorInfo() = {
274
- val mt @ MethodType(paramNames) = denot.info
275
val rt = classRoot.typeRef appliedTo (classRoot.typeParams map (_.typeRef))
276
- denot.info = mt.derivedLambdaType(paramNames, mt.paramInfos, rt)
+
+ 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)
282
addConstructorTypeParams(denot)
283
}
284
0 commit comments