File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -3581,6 +3581,9 @@ class Typer extends Namer
3581
3581
case _ : IntegratedTypeArgs => tree
3582
3582
case _ => tryInsertApplyOrImplicit(tree, pt, locked)(tree) // error will be reported in typedTypeApply
3583
3583
}
3584
+ case pt : SelectionProto if tree.isInstanceOf [ExtMethodApply ] =>
3585
+ assert(pt.extensionName == tree.symbol.name)
3586
+ tree
3584
3587
case _ =>
3585
3588
if (ctx.mode is Mode .Type ) adaptType(tree.tpe)
3586
3589
else adaptNoArgs(wtp)
Original file line number Diff line number Diff line change
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
+
You can’t perform that action at this time.
0 commit comments