File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed
library/src/scala/compiletime/ops Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ package object ops {
1111 * val eq3: "1" == "1" = true
1212 * ```
1313 */
14- @ infix type == [X <: AnyVal , Y <: AnyVal ] <: Boolean
14+ @ infix type == [X , Y ] <: Boolean
1515
1616 /** Inequality comparison of two singleton types.
1717 * ```scala
@@ -20,7 +20,7 @@ package object ops {
2020 * val eq3: "1" != "1" = false
2121 * ```
2222 */
23- @ infix type != [X <: AnyVal , Y <: AnyVal ] <: Boolean
23+ @ infix type != [X , Y ] <: Boolean
2424 }
2525
2626 object string {
Original file line number Diff line number Diff line change 1+ -- [E007] Type Mismatch Error: tests/neg/singleton-ops-any.scala:6:23 --------------------------------------------------
2+ 6 | val t34: 10 == "5" = true // error
3+ | ^^^^
4+ | Found: (true : Boolean)
5+ | Required: (false : Boolean)
6+ -- [E007] Type Mismatch Error: tests/neg/singleton-ops-any.scala:7:22 --------------------------------------------------
7+ 7 | val t35: 10 == 10 = false // error
8+ | ^^^^^
9+ | Found: (false : Boolean)
10+ | Required: (true : Boolean)
11+ -- [E007] Type Mismatch Error: tests/neg/singleton-ops-any.scala:12:24 -------------------------------------------------
12+ 12 | val t38: false != 5 = false // error
13+ | ^^^^^
14+ | Found: (false : Boolean)
15+ | Required: (true : Boolean)
16+ -- [E007] Type Mismatch Error: tests/neg/singleton-ops-any.scala:13:22 -------------------------------------------------
17+ 13 | val t39: 10 != 10 = true // error
18+ | ^^^^
19+ | Found: (true : Boolean)
20+ | Required: (false : Boolean)
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ object Test {
55 val t33 : 0 == false = false
66 val t34 : 10 == " 5" = true // error
77 val t35 : 10 == 10 = false // error
8+ val t35string : " 10" == " 10" = true
89
910 val t36 : 1 != 1 = false
1011 val t37 : 0 != 1 = true
You can’t perform that action at this time.
0 commit comments