diff --git a/tests/pos/i5793/A.scala b/tests/pos/i5793/A.scala new file mode 100644 index 000000000000..7c13245ef3f6 --- /dev/null +++ b/tests/pos/i5793/A.scala @@ -0,0 +1,11 @@ +object exec{ + trait Runner[T]{ + def run(t: T): Unit + } + object Runner{ + def run[T: Runner](t: T): Unit = implicitly[Runner[T]].run(t) + implicit inline def runImplicitly[T]: Runner[T] = new { + def run(t: T) = List(()).map(x => x).head // <<< + } + } +} diff --git a/tests/pos/i5793/B.scala b/tests/pos/i5793/B.scala new file mode 100644 index 000000000000..a2f0f96c6f7e --- /dev/null +++ b/tests/pos/i5793/B.scala @@ -0,0 +1,6 @@ +object Main{ + def main(args: Array[String]): Unit = { + import exec._ + Runner.run(Some(5)) + } +}