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.
2 parents 27a59ec + 1f94a38 commit cad5cc9Copy full SHA for cad5cc9
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -3581,6 +3581,9 @@ class Typer extends Namer
3581
case _: IntegratedTypeArgs => tree
3582
case _ => tryInsertApplyOrImplicit(tree, pt, locked)(tree) // error will be reported in typedTypeApply
3583
}
3584
+ case pt: SelectionProto if tree.isInstanceOf[ExtMethodApply] =>
3585
+ assert(pt.extensionName == tree.symbol.name)
3586
+ tree
3587
case _ =>
3588
if (ctx.mode is Mode.Type) adaptType(tree.tpe)
3589
else adaptNoArgs(wtp)
tests/pos/i9828.scala
@@ -0,0 +1,8 @@
1
+
2
3
4
+extension (x: Int) inline def g (y: Int): Int = x + y
5
+extension [S](f: S => Int) inline def f(s: String) = "test"
6
+val z = 1.g(2)
7
+def testStuff = ((s: String) => 42).f("foo")
8
0 commit comments