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 a29178c commit 5cddbc7Copy full SHA for 5cddbc7
tests/pos/singleton-ops-test-issue-8287.scala
@@ -0,0 +1,14 @@
1
+import scala.compiletime.ops.int._
2
+import scala.annotation.infix
3
+
4
+object Test {
5
+ class Vec[S <: Int] {
6
+ @infix def concat [RS <: Int](that : Vec[RS]) : Vec[S + RS] = new Vec[S + RS]
7
+ }
8
9
+ val v1 = new Vec[1]
10
+ val v2 = new Vec[2]
11
+ val v3 : Vec[3] = v1 concat v2
12
+ val v3a = v1 concat v2
13
+ val v3b : Vec[3] = v3a
14
+}
0 commit comments