File tree Expand file tree Collapse file tree 2 files changed +17
-9
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -3730,16 +3730,8 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
37303730 missingArgs(wtp)
37313731 }
37323732
3733- def isContextFunctionRef (wtp : Type ): Boolean = wtp match {
3734- case RefinedType (parent, nme.apply, _) =>
3735- isContextFunctionRef(parent) // apply refinements indicate a dependent CFT
3736- case _ =>
3737- val underlying = wtp.underlyingClassRef(refinementOK = false ) // other refinements are not OK
3738- defn.isContextFunctionClass(underlying.classSymbol)
3739- }
3740-
37413733 def adaptNoArgsOther (wtp : Type , functionExpected : Boolean ): Tree = {
3742- val implicitFun = isContextFunctionRef (wtp) && ! untpd.isContextualClosure(tree)
3734+ val implicitFun = defn.isContextFunctionType (wtp) && ! untpd.isContextualClosure(tree)
37433735 def caseCompanion =
37443736 functionExpected &&
37453737 tree.symbol.is(Module ) &&
Original file line number Diff line number Diff line change 1+ object Test {
2+ trait Transaction
3+ type Transactional [T ] = (t : Transaction ) ?=> T
4+
5+ def ff (x : Int ): Transactional [Int ] = {
6+ summon[Transaction ]
7+ x
8+ }
9+
10+ def fff (x : Int ): Transactional [Int ] = {
11+ summon[Transaction ]
12+ val x1 = ff(x)
13+ x1
14+ }
15+
16+ }
You can’t perform that action at this time.
0 commit comments