We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ea8877 commit 5aa31faCopy full SHA for 5aa31fa
tests/pos/opaque.scala
@@ -1,3 +1,4 @@
1
+import Predef.{any2stringadd => _, _}
2
object opaquetypes {
3
opaque type Logarithm = Double
4
@@ -26,7 +27,10 @@ object usesites {
26
27
val l = Logarithm(1.0)
28
val l2 = Logarithm(2.0)
29
val l3 = l * l2
- val l4 = l + l2
30
+ val l4 = l + l2 // currently requires any2stringadd to be disabled because
31
+ // as a contextual implicit this takes precedence over the
32
+ // implicit scope implicit LogarithmOps.
33
+ // TODO: Remove any2stringadd
34
val d = l3.toDouble
- val l4: Logarithm = (1.0).asInstanceOf[Logarithm]
35
+ val l5: Logarithm = (1.0).asInstanceOf[Logarithm]
36
}
0 commit comments