summary refs log tree commit diff stats
path: root/tests/reject
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reject')
-rw-r--r--tests/reject/mambsym1.nim10
-rw-r--r--tests/reject/mambsym2.nim3
-rw-r--r--tests/reject/mnamspc1.nim2
-rw-r--r--tests/reject/mnamspc2.nim3
-rw-r--r--tests/reject/mopaque.nim5
-rw-r--r--tests/reject/tatomic.nim5
6 files changed, 28 insertions, 0 deletions
diff --git a/tests/reject/mambsym1.nim b/tests/reject/mambsym1.nim
new file mode 100644
index 000000000..cf8ac5242
--- /dev/null
+++ b/tests/reject/mambsym1.nim
@@ -0,0 +1,10 @@
+import mambsym2 # import TExport

+

+type

+  TExport* = enum x, y, z

+  TOtherEnum* = enum mDec, mInc, mAssign

+

+proc ha() =

+  var

+    x: TExport # no error

+  nil

diff --git a/tests/reject/mambsym2.nim b/tests/reject/mambsym2.nim
new file mode 100644
index 000000000..eac8de6ba
--- /dev/null
+++ b/tests/reject/mambsym2.nim
@@ -0,0 +1,3 @@
+type

+  TExport* = enum a, b, c

+  

diff --git a/tests/reject/mnamspc1.nim b/tests/reject/mnamspc1.nim
new file mode 100644
index 000000000..da13c5f24
--- /dev/null
+++ b/tests/reject/mnamspc1.nim
@@ -0,0 +1,2 @@
+import mnamspc2

+

diff --git a/tests/reject/mnamspc2.nim b/tests/reject/mnamspc2.nim
new file mode 100644
index 000000000..84ef8533e
--- /dev/null
+++ b/tests/reject/mnamspc2.nim
@@ -0,0 +1,3 @@
+# export an identifier:

+var

+  global*: int

diff --git a/tests/reject/mopaque.nim b/tests/reject/mopaque.nim
new file mode 100644
index 000000000..b7c5180fd
--- /dev/null
+++ b/tests/reject/mopaque.nim
@@ -0,0 +1,5 @@
+type

+  TLexer* {.final.} = object

+    line*: int

+    filename*: string

+    buffer: cstring

diff --git a/tests/reject/tatomic.nim b/tests/reject/tatomic.nim
new file mode 100644
index 000000000..0f1b8125d
--- /dev/null
+++ b/tests/reject/tatomic.nim
@@ -0,0 +1,5 @@
+var 
+  atomic: int
+  
+echo atomic
+