Skip to content

Commit 16f0972

Browse files
committed
Fix #5793: Add regression test
1 parent fbafb72 commit 16f0972

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

tests/pos/i5793/A.scala

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
object exec{
2+
trait Runner[T]{
3+
def run(t: T): Unit
4+
}
5+
object Runner{
6+
def run[T: Runner](t: T): Unit = implicitly[Runner[T]].run(t)
7+
implicit inline def runImplicitly[T]: Runner[T] = new {
8+
def run(t: T) = List(()).map(x => x).head // <<<
9+
}
10+
}
11+
}

tests/pos/i5793/B.scala

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
object Main{
2+
def main(args: Array[String]): Unit = {
3+
import exec._
4+
Runner.run(Some(5))
5+
}
6+
}

0 commit comments

Comments
 (0)