File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ -- [E008] Not Found Error: tests/neg/i6183.scala:5:5 -------------------------------------------------------------------
2
+ 5 | 42.render // error
3
+ | ^^^^^^^^^
4
+ | value render is not a member of Int.
5
+ | An extension method was tried, but could not be fully constructed:
6
+ |
7
+ | extension_render(42)
8
+ -- [E051] Reference Error: tests/neg/i6183.scala:6:2 -------------------------------------------------------------------
9
+ 6 | extension_render(42) // error
10
+ | ^^^^^^^^^^^^^^^^
11
+ | Ambiguous overload. The overloaded alternatives of method extension_render with types
12
+ | [B](b: B)(using x$1: DummyImplicit): Char
13
+ | [A](a: A): String
14
+ | both match arguments ((42 : Int))
15
+
16
+ longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change
1
+ extension [A ](a : A ) def render : String = " Hi"
2
+ extension [B ](b : B ) def render (using DummyImplicit ): Char = 'x'
3
+
4
+ val test = {
5
+ 42 .render // error
6
+ extension_render(42 ) // error
7
+ }
You can’t perform that action at this time.
0 commit comments