From f00c82f7e32894bcfc3f4a8b1ae3f8a01fe5ca8c Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Fri, 14 Jun 2024 14:15:12 +0200 Subject: [PATCH] Add regression test for i20498 --- tests/pos/i20498/impl.scala | 4 ++++ tests/pos/i20498/ops.scala | 4 ++++ tests/pos/i20498/package.scala | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 tests/pos/i20498/impl.scala create mode 100644 tests/pos/i20498/ops.scala create mode 100644 tests/pos/i20498/package.scala diff --git a/tests/pos/i20498/impl.scala b/tests/pos/i20498/impl.scala new file mode 100644 index 000000000000..81ad4e8d4633 --- /dev/null +++ b/tests/pos/i20498/impl.scala @@ -0,0 +1,4 @@ +package demo.debug +import demo.util._ +class Impl: + "".tap() diff --git a/tests/pos/i20498/ops.scala b/tests/pos/i20498/ops.scala new file mode 100644 index 000000000000..9a1949d44421 --- /dev/null +++ b/tests/pos/i20498/ops.scala @@ -0,0 +1,4 @@ +package demo.util +trait Ops: + final implicit class Ops[A](private val self: A): + def tap(): Unit = () diff --git a/tests/pos/i20498/package.scala b/tests/pos/i20498/package.scala new file mode 100644 index 000000000000..1dac7f805c9a --- /dev/null +++ b/tests/pos/i20498/package.scala @@ -0,0 +1,2 @@ +package demo +package object util extends Ops