We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d6d29fc + 16f0972 commit 16c1585Copy full SHA for 16c1585
tests/pos/i5793/A.scala
@@ -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
@@ -0,0 +1,6 @@
+object Main{
+ def main(args: Array[String]): Unit = {
+ import exec._
+ Runner.run(Some(5))
0 commit comments