make tests green again

This commit is contained in:
Andreas Rumpf 2018-07-05 15:51:04 +02:00
commit 0926754e68
31 changed files with 61 additions and 55 deletions

View file

@ -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)

View file

@ -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]