forked from nim-lang/Nim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for issue 15435 (nim-lang#19079)
* Add test for issue 15435 Closes nim-lang#15435. * Specify bug # in comment Addresses nim-lang#19079 (comment)
- Loading branch information
1 parent
84c3da6
commit 322e771
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# bug #15435 | ||
discard """ | ||
errormsg: "type mismatch: got <set[uint8], set[range 1..5(uint8)]>" | ||
nimout: '''t15435.nim(28, 13) Error: type mismatch: got <set[uint8], set[range 1..5(uint8)]> | ||
but expected one of: | ||
proc `<`[T](x, y: set[T]): bool | ||
first type mismatch at position: 2 | ||
required type for y: set[T] | ||
but expression 'x' is of type: set[range 1..5(uint8)] | ||
20 other mismatching symbols have been suppressed; compile with --showAllMismatches:on to see them | ||
expression: {1'u8, 5} < x''' | ||
""" | ||
|
||
|
||
|
||
|
||
|
||
|
||
## line 20 | ||
var | ||
x: set[range[1u8..5u8]] | ||
|
||
x.incl(1) | ||
x.incl(3) | ||
x.incl(5) | ||
|
||
if {1u8, 5} < x: | ||
echo "successful" |