summary refs log tree commit diff stats
path: root/tests/compile/tobjcov.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-01-13 02:10:03 +0100
committerAraq <rumpf_a@web.de>2014-01-13 02:10:03 +0100
commit20b5f31c03fb556ec0aa2428a40adbac004d8987 (patch)
tree58086941e7d6bb8f480ca1173a95722ada9435b2 /tests/compile/tobjcov.nim
parent51ee524109cf7e3e86c676bc1676063a01bfd979 (diff)
downloadNim-20b5f31c03fb556ec0aa2428a40adbac004d8987.tar.gz
new tester; all tests categorized
Diffstat (limited to 'tests/compile/tobjcov.nim')
-rw-r--r--tests/compile/tobjcov.nim17
1 files changed, 0 insertions, 17 deletions
diff --git a/tests/compile/tobjcov.nim b/tests/compile/tobjcov.nim
deleted file mode 100644
index fc44edf8e..000000000
--- a/tests/compile/tobjcov.nim
+++ /dev/null
@@ -1,17 +0,0 @@
-# Covariance is not type safe:
-
-type
-  TA = object of TObject
-    a: int
-  TB = object of TA
-    b: array[0..5000_000, int]
-    
-proc ap(x: var TA) = x.a = -1
-proc bp(x: var TB) = x.b[high(x.b)] = -1
-    
-# in Nimrod proc (x: TB) is compatible to proc (x: TA),
-# but this is not type safe:
-var f = cast[proc (x: var TA) {.nimcall.}](bp)
-var a: TA
-f(a) # bp expects a TB, but gets a TA
-