summary refs log tree commit diff stats
path: root/tests/effects/teffects3.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/effects/teffects3.nim')
-rw-r--r--tests/effects/teffects3.nim18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/effects/teffects3.nim b/tests/effects/teffects3.nim
new file mode 100644
index 000000000..4c050510a
--- /dev/null
+++ b/tests/effects/teffects3.nim
@@ -0,0 +1,18 @@
+discard """
+  errormsg: "type mismatch"
+  line: 18
+"""
+
+type
+  TObj {.pure, inheritable.} = object
+  TObjB = object of TObj
+    a, b, c: string
+    fn: proc (): int {.tags: [].}
+
+
+
+proc raiser(): int {.tags: [TObj, WriteIoEffect].} =
+  writeLine stdout, "arg"
+
+var o: TObjB
+o.fn = raiser