We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 662060d + 5877cc7 commit ce6a47bCopy full SHA for ce6a47b
tests/neg/i12754.scala
@@ -0,0 +1,15 @@
1
+transparent inline def transform(inline a: Any): Any = inline a match {
2
+ case x: Byte => x
3
+ case x: Short => x
4
+ case x: Int => x
5
+ case x: Long => x
6
+ case x: Float => x
7
+ case x: Double => x
8
+ case _ => a
9
+}
10
+
11
+inline def lt(inline a: Any, inline b: Double): Boolean = transform(a) < b // error
12
13
+def test = {
14
+ println(lt(0, 5))
15
tests/pos/i12754.scala
@@ -0,0 +1,13 @@
+ println(transform(0) < 5)
0 commit comments