diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-07-05 15:51:04 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-07-05 15:51:04 +0200 |
commit | 0926754e68861947c67986bc9c7e0a011a58267b (patch) | |
tree | bc11469a33f1aabd202e7105177553688439712a /tests/objects | |
parent | 9b31f6785947974e89d46bbc0dee11f1c78754dc (diff) | |
download | Nim-0926754e68861947c67986bc9c7e0a011a58267b.tar.gz |
make tests green again
Diffstat (limited to 'tests/objects')
-rw-r--r-- | tests/objects/tinherentedvalues.nim | 8 | ||||
-rw-r--r-- | tests/objects/tobjcov.nim | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/objects/tinherentedvalues.nim b/tests/objects/tinherentedvalues.nim index ad7b5f326..7d4d7d23e 100644 --- a/tests/objects/tinherentedvalues.nim +++ b/tests/objects/tinherentedvalues.nim @@ -6,7 +6,7 @@ true # bug #1053 type - TA = object of TObject + TA = object of RootObj a: int TB = object of TA @@ -32,13 +32,13 @@ test(v) # bug #924 type - MyObject = object of TObject + MyObject = object of RootObj x: int var asd: MyObject -proc isMyObject(obj: TObject) = +proc isMyObject(obj: RootObj) = echo obj of MyObject if obj of MyObject: let a = MyObject(obj) @@ -46,7 +46,7 @@ proc isMyObject(obj: TObject) = asd.x = 5 -#var asdCopy = TObject(asd) +#var asdCopy = RootObj(asd) #echo asdCopy of MyObject isMyObject(asd) diff --git a/tests/objects/tobjcov.nim b/tests/objects/tobjcov.nim index cf2e5becf..c766adde0 100644 --- a/tests/objects/tobjcov.nim +++ b/tests/objects/tobjcov.nim @@ -1,7 +1,7 @@ # Covariance is not type safe: type - TA = object of TObject + TA = object of RootObj a: int TB = object of TA b: array[0..5000_000, int] |