Skip to content

Commit bf3bd0a

Browse files
committed
Fix
1 parent d918b22 commit bf3bd0a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ object Typer {
118118
* apply of a function class?
119119
*/
120120
private[typer] def isSyntheticApply(tree: tpd.Tree): Boolean = tree match {
121-
case tree: tpd.Select => tree.hasAttachment(InsertedApply)
121+
case _: (tpd.Select | tpd.Apply) => tree.hasAttachment(InsertedApply)
122122
case TypeApply(fn, targs) => isSyntheticApply(fn) && targs.forall(_.isInstanceOf[tpd.InferredTypeTree])
123123
case _ => false
124124
}

tests/pos/i14907.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ object Module {
55
case 1 => Any *: Fill[0]
66
}
77
extension[N <: Int] (f: Fun[N])
8-
def apply: Fill[N] => Any = ???
8+
def apply(): Fill[N] => Any = ???
99

10-
Fun[1]()(???)
10+
Fun[1]()()(???)
1111
}

0 commit comments

Comments
 (0)