Skip to content

Commit 1e7bf82

Browse files
committed
Add failing test for #9685
1 parent 5d2812a commit 1e7bf82

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

tests/neg-macros/i9685bis.check

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-- [E008] Not Found Error: tests/neg-macros/i9685bis.scala:23:4 --------------------------------------------------------
2+
23 | 1.asdf // error
3+
| ^^^^^^
4+
| value asdf is not a member of Int, but could be made available as an extension method.
5+
|
6+
| The following import might make progress towards fixing the problem:
7+
|
8+
| import foo.Baz.toBaz
9+
|

tests/neg-macros/i9685bis.scala

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package foo
2+
3+
import scala.language.implicitConversions
4+
5+
class Foo
6+
7+
object Foo:
8+
9+
inline implicit def toFoo(x: Int): Foo = Foo()
10+
11+
class Bar
12+
13+
object Bar:
14+
inline given Conversion[Int, Bar] with
15+
def apply(x: Int): Bar = Bar()
16+
17+
class Baz
18+
19+
object Baz:
20+
transparent inline implicit def toBaz(x: Int): Baz = Baz()
21+
22+
object Usage:
23+
1.asdf // error

0 commit comments

Comments
 (0)