From 0926754e68861947c67986bc9c7e0a011a58267b Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Thu, 5 Jul 2018 15:51:04 +0200 Subject: make tests green again --- tests/objects/tinherentedvalues.nim | 8 ++++---- tests/objects/tobjcov.nim | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/objects') 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] -- cgit 1.4.1-2-gfad0