summary refs log tree commit diff stats
path: root/tests/constr/tconstr1.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/constr/tconstr1.nim')
-rw-r--r--tests/constr/tconstr1.nim46
1 files changed, 23 insertions, 23 deletions
diff --git a/tests/constr/tconstr1.nim b/tests/constr/tconstr1.nim
index 45e303554..28431287c 100644
--- a/tests/constr/tconstr1.nim
+++ b/tests/constr/tconstr1.nim
@@ -3,28 +3,28 @@ discard """
   line: 25
   errormsg: "type mismatch"
 """
-# 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'})]

+# 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'})]
 
 
d='n177' href='#n177'>177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200