summary refs log tree commit diff stats
path: root/tests/objects/trefobjsyntax.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/objects/trefobjsyntax.nim')
-rw-r--r--tests/objects/trefobjsyntax.nim27
1 files changed, 0 insertions, 27 deletions
diff --git a/tests/objects/trefobjsyntax.nim b/tests/objects/trefobjsyntax.nim
deleted file mode 100644
index 9b48de718..000000000
--- a/tests/objects/trefobjsyntax.nim
+++ /dev/null
@@ -1,27 +0,0 @@
-discard """
-  output: '''wohoo
-baz'''
-"""
-
-# Test to ensure the popular 'ref T' syntax works everywhere
-
-type
-  Foo = object
-    a, b: int
-    s: string
-
-  FooBar = object of RootObj
-    n, m: string
-  Baz = object of FooBar
-
-proc invoke(a: ref Baz) =
-  echo "baz"
-
-# check object construction:
-let x = (ref Foo)(a: 0, b: 45, s: "wohoo")
-echo x.s
-
-var y: ref FooBar = (ref Baz)(n: "n", m: "m")
-
-invoke((ref Baz)(y))
-