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 89e57aa commit 4de7351Copy full SHA for 4de7351
compiler/src/dotty/tools/dotc/typer/Synthesizer.scala
@@ -163,7 +163,7 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
163
164
formal.argInfos match
165
case arg :: Nil =>
166
- fullyDefinedType(arg.dealias, "ValueOf argument", span).normalized match
+ fullyDefinedType(arg, "ValueOf argument", span).normalized.dealias match
167
case ConstantType(c: Constant) =>
168
success(Literal(c))
169
case TypeRef(_, sym) if sym == defn.UnitClass =>
tests/pos/i12583.scala
@@ -0,0 +1,5 @@
1
+case class Wrapper[A <: Singleton](a: A)(using ValueOf[A])
2
+
3
+def test[A <: Singleton](blabla: Wrapper[A]): Unit = ()
4
5
+val _ = test(Wrapper("yo"))
0 commit comments