File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -4013,6 +4013,8 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
40134013 cpy.Select (qual)(pre, name.toTypeName)
40144014 case qual : This if qual.symbol.is(ModuleClass ) =>
40154015 cpy.Ident (qual)(qual.symbol.name.sourceModuleName.toTypeName)
4016+ case _ =>
4017+ errorTree(tree, em " cannot convert from $tree to an instance creation expression " )
40164018 val tycon = tree.tpe.widen.finalResultType.underlyingClassRef(refinementOK = false )
40174019 typed(
40184020 untpd.Select (
Original file line number Diff line number Diff line change 1+ package x
2+
3+ import scala .concurrent .*
4+
5+ def cpsAsync [F [_]] =
6+ Test .InfernAsyncArg
7+
8+ object Test {
9+ class InfernAsyncArg [F [_]] {
10+ def apply [A ](): F [A ] = ???
11+ }
12+ object InfernAsyncArg
13+
14+ def testExample1Future (): Unit =
15+ val fr = cpsAsync[Future ]() // error
16+ }
You can’t perform that action at this time.
0 commit comments