File tree 2 files changed +18
-0
lines changed
compiler/src/dotty/tools/dotc/typer
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
4013
4013
cpy.Select (qual)(pre, name.toTypeName)
4014
4014
case qual : This if qual.symbol.is(ModuleClass ) =>
4015
4015
cpy.Ident (qual)(qual.symbol.name.sourceModuleName.toTypeName)
4016
+ case _ =>
4017
+ errorTree(tree, em " cannot convert from $tree to an instance creation expression " )
4016
4018
val tycon = tree.tpe.widen.finalResultType.underlyingClassRef(refinementOK = false )
4017
4019
typed(
4018
4020
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