From cb79bf9f163225680969875d95f78d5f4aac44c0 Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 16 Apr 2012 23:40:08 +0200 Subject: compiler finally supports 'object {.pragma.}' syntax --- tests/run/tfinalobj.nim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/run/tfinalobj.nim (limited to 'tests/run') diff --git a/tests/run/tfinalobj.nim b/tests/run/tfinalobj.nim new file mode 100644 index 000000000..b559980d6 --- /dev/null +++ b/tests/run/tfinalobj.nim @@ -0,0 +1,16 @@ +discard """ + outp: "abc" +""" + +type + TA = object {.pure, final.} + x: string + +var + a: TA +a.x = "abc" + +doAssert TA.sizeof == string.sizeof + +echo a.x + -- cgit 1.4.1-2-gfad0