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 8fe40ca commit 63f7dbaCopy full SHA for 63f7dba
compiler/src/dotty/tools/dotc/typer/Namer.scala
@@ -1656,7 +1656,7 @@ class Namer { typer: Typer =>
1656
ctx.defContext(sym).denotNamed(original)
1657
def paramProto(paramss: List[List[Type]], idx: Int): Type = paramss match {
1658
case params :: paramss1 =>
1659
- if (idx < params.length) params(idx)
+ if (idx < params.length) params(idx).widenByName
1660
else paramProto(paramss1, idx - params.length)
1661
case nil =>
1662
NoType
tests/pos/byname-default.scala
@@ -0,0 +1,5 @@
1
+// Extraction of a failing case in scalaSTM
2
+object Test:
3
+
4
+ def apply[A](init: => A = null.asInstanceOf[A]) = init
5
0 commit comments