summary refs log tree commit diff stats
path: root/tests/tconstr1.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tconstr1.nim')
-rwxr-xr-xtests/tconstr1.nim23
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/tconstr1.nim b/tests/tconstr1.nim
deleted file mode 100755
index 488170350..000000000
--- a/tests/tconstr1.nim
+++ /dev/null
@@ -1,23 +0,0 @@
-# Test array, record constructors

-

-type

-  TComplexRecord = tuple[

-    s: string,

-    x, y: int,

-    z: float,

-    chars: set[Char]]

-

-proc testSem =

-  var

-    things: array [0..1, TComplexRecord] = [

-      (s: "hi", x: 69, y: 45, z: 0.0, chars: {'a', 'b', 'c'}),

-      (s: "hi", x: 69, y: 45, z: 1.0, chars: {'a', 'b', 'c'})]

-  write(stdout, things[0].x)

-

-const

-  things: array [0..1, TComplexRecord] = [

-    (s: "hi", x: 69, y: 45, z: 0.0, chars: {'a', 'b', 'c'}),

-    (s: "hi", x: 69, y: 45, z: 1.0)] #ERROR

-  otherThings = [  # the same

-    (s: "hi", x: 69, y: 45, z: 0.0, chars: {'a', 'b', 'c'}),

-    (s: "hi", x: 69, y: 45, z: 1.0, chars: {'a'})]