-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
used a different implementation to bypass issue #8693
- Loading branch information
1 parent
06de483
commit a1e29f8
Showing
2 changed files
with
37 additions
and
3 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
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,31 @@ | ||
discard """ | ||
""" | ||
|
||
# NOTE: ttypetraits.nim is disabled, so using typetraits2.nim | ||
import typetraits | ||
|
||
block sameType: | ||
doAssert int == int | ||
|
||
type Foo = int | float | ||
doAssert Foo == Foo | ||
doAssert: Foo != int | ||
doAssert: int != Foo | ||
|
||
type myInt = distinct int | ||
doAssert myInt == myInt | ||
doAssert: int != myInt | ||
|
||
type Foo2 = float | int | ||
when false: | ||
# TODO: this fails | ||
doAssert Foo2 == Foo | ||
|
||
type A=object of RootObj | ||
b1:int | ||
|
||
type B=object of A | ||
b2:int | ||
doAssert: A != B | ||
doAssert: B != A | ||
doAssert B == B |