From edcf0232381c38abfb0f3fb611f40df587d2196a Mon Sep 17 00:00:00 2001 From: Julien Richard-Foy Date: Tue, 6 Jun 2023 15:53:42 +0200 Subject: [PATCH] Add failing test for #9685 --- tests/neg-macros/i9685bis.check | 4 ++++ tests/neg-macros/i9685bis.scala | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/neg-macros/i9685bis.check create mode 100644 tests/neg-macros/i9685bis.scala diff --git a/tests/neg-macros/i9685bis.check b/tests/neg-macros/i9685bis.check new file mode 100644 index 000000000000..7677e2e7b6f8 --- /dev/null +++ b/tests/neg-macros/i9685bis.check @@ -0,0 +1,4 @@ +-- [E008] Not Found Error: tests/neg-macros/i9685bis.scala:14:4 -------------------------------------------------------- +14 | 1.asdf // error + | ^^^^^^ + | value asdf is not a member of Int diff --git a/tests/neg-macros/i9685bis.scala b/tests/neg-macros/i9685bis.scala new file mode 100644 index 000000000000..86e1489796a7 --- /dev/null +++ b/tests/neg-macros/i9685bis.scala @@ -0,0 +1,12 @@ +package foo + +import scala.language.implicitConversions + +class Foo + +object Foo: + + inline implicit def toFoo(x: Int): Foo = Foo() + +object Usage: + 1.asdf // error