Skip to content

Commit f634215

Browse files
committed
Add @infix annotation to infix singleton ops
1 parent 4d73d89 commit f634215

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed
Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
package scala.compiletime
22

3+
import scala.annotation.infix
4+
35
package object ops {
4-
type ==[X <: AnyVal, Y <: AnyVal] <: Boolean
5-
type !=[X <: AnyVal, Y <: AnyVal] <: Boolean
6+
@infix type ==[X <: AnyVal, Y <: AnyVal] <: Boolean
7+
@infix type !=[X <: AnyVal, Y <: AnyVal] <: Boolean
68

7-
type +[X <: Int, Y <: Int] <: Int
8-
type -[X <: Int, Y <: Int] <: Int
9-
type *[X <: Int, Y <: Int] <: Int
10-
type /[X <: Int, Y <: Int] <: Int
11-
type %[X <: Int, Y <: Int] <: Int
9+
@infix type +[X <: Int, Y <: Int] <: Int
10+
@infix type -[X <: Int, Y <: Int] <: Int
11+
@infix type *[X <: Int, Y <: Int] <: Int
12+
@infix type /[X <: Int, Y <: Int] <: Int
13+
@infix type %[X <: Int, Y <: Int] <: Int
1214

13-
type <[X <: Int, Y <: Int] <: Boolean
14-
type >[X <: Int, Y <: Int] <: Boolean
15-
type >=[X <: Int, Y <: Int] <: Boolean
16-
type <=[X <: Int, Y <: Int] <: Boolean
15+
@infix type <[X <: Int, Y <: Int] <: Boolean
16+
@infix type >[X <: Int, Y <: Int] <: Boolean
17+
@infix type >=[X <: Int, Y <: Int] <: Boolean
18+
@infix type <=[X <: Int, Y <: Int] <: Boolean
1719

1820
type Abs[X <: Int] <: Int
1921
type Negate[X <: Int] <: Int
2022
type Min[X <: Int, Y <: Int] <: Int
2123
type Max[X <: Int, Y <: Int] <: Int
2224

2325
type ![X <: Boolean] <: Boolean
24-
type ^[X <: Boolean, Y <: Boolean] <: Boolean
25-
type &&[X <: Boolean, Y <: Boolean] <: Boolean
26-
type ||[X <: Boolean, Y <: Boolean] <: Boolean
26+
@infix type ^[X <: Boolean, Y <: Boolean] <: Boolean
27+
@infix type &&[X <: Boolean, Y <: Boolean] <: Boolean
28+
@infix type ||[X <: Boolean, Y <: Boolean] <: Boolean
2729
}

0 commit comments

Comments
 (0)