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 e74fd6c commit 99cd405Copy full SHA for 99cd405
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -1475,8 +1475,7 @@ class Typer extends Namer
1475
*/
1476
def maybeCall(ref: Tree, psym: Symbol, cinfo: Type): Tree = cinfo.stripPoly match {
1477
case cinfo @ MethodType(Nil) if cinfo.resultType.isImplicitMethod =>
1478
- val icall = New(ref).select(nme.CONSTRUCTOR).appliedToNone
1479
- typedExpr(untpd.TypedSplice(icall))(superCtx)
+ typedExpr(untpd.New(ref, Nil))(superCtx)
1480
case cinfo @ MethodType(Nil) if !cinfo.resultType.isInstanceOf[MethodType] =>
1481
ref
1482
case cinfo: MethodType =>
tests/pos/i4582.scala
@@ -0,0 +1,6 @@
1
+trait T[A: Numeric]
2
+class TX[A: Numeric] extends T[A]
3
+class TY[A: Numeric] extends T[A]()
4
+
5
+trait S[A: Numeric](x: Int)
6
+class SX[A: Numeric] extends S[A](0)
0 commit comments