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.
2 parents ba01fba + 9740ab8 commit 2d572c5Copy full SHA for 2d572c5
compiler/src/dotty/tools/dotc/transform/HoistSuperArgs.scala
@@ -128,8 +128,10 @@ class HoistSuperArgs extends MiniPhaseTransform with IdentityDenotTransformer {
128
case tp: NamedType
129
if (tp.symbol.owner == cls || tp.symbol.owner == constr) &&
130
tp.symbol.isParamOrAccessor =>
131
- val mappedSym = origToParam(tp.symbol)
132
- if (tp.symbol.isType) mappedSym.typeRef else mappedSym.termRef
+ origToParam.get(tp.symbol) match {
+ case Some(mappedSym) => if (tp.symbol.isType) mappedSym.typeRef else mappedSym.termRef
133
+ case None => mapOver(tp)
134
+ }
135
case _ =>
136
mapOver(tp)
137
}
tests/pos/i3189.scala
@@ -0,0 +1,3 @@
1
+class Test[A](action: A => A) {
2
+ def this() = this(a => a)
3
+}
0 commit comments