summary refs log tree commit diff stats
path: root/tests/effects/teffects4.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/effects/teffects4.nim')
-rw-r--r--tests/effects/teffects4.nim24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/effects/teffects4.nim b/tests/effects/teffects4.nim
new file mode 100644
index 000000000..4584e6dc8
--- /dev/null
+++ b/tests/effects/teffects4.nim
@@ -0,0 +1,24 @@
+discard """
+  line: 23
+  errormsg: "type mismatch"
+"""
+
+type
+  TObj = object {.pure, inheritable.}
+  TObjB = object of TObj
+    a, b, c: string
+    fn: proc (): int {.tags: [FReadIO].}
+  
+  EIO2 = ref object of EIO
+
+proc q() {.tags: [FIO].} =
+  nil
+  
+proc raiser(): int =
+  writeln stdout, "arg"
+  if true:
+    q()
+
+var o: TObjB
+o.fn = raiser
+