Skip to content

Commit

Permalink
Add failing test for #9685
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrf committed Jun 13, 2023
1 parent 5d2812a commit 1e7bf82
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/neg-macros/i9685bis.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- [E008] Not Found Error: tests/neg-macros/i9685bis.scala:23:4 --------------------------------------------------------
23 | 1.asdf // error
| ^^^^^^
| value asdf is not a member of Int, but could be made available as an extension method.
|
| The following import might make progress towards fixing the problem:
|
| import foo.Baz.toBaz
|
23 changes: 23 additions & 0 deletions tests/neg-macros/i9685bis.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package foo

import scala.language.implicitConversions

class Foo

object Foo:

inline implicit def toFoo(x: Int): Foo = Foo()

class Bar

object Bar:
inline given Conversion[Int, Bar] with
def apply(x: Int): Bar = Bar()

class Baz

object Baz:
transparent inline implicit def toBaz(x: Int): Baz = Baz()

object Usage:
1.asdf // error

0 comments on commit 1e7bf82

Please sign in to comment.