summary refs log tree commit diff stats
path: root/tests/objects/tdefaultfieldscheck.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/objects/tdefaultfieldscheck.nim')
-rw-r--r--tests/objects/tdefaultfieldscheck.nim16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/objects/tdefaultfieldscheck.nim b/tests/objects/tdefaultfieldscheck.nim
new file mode 100644
index 000000000..8a05439d9
--- /dev/null
+++ b/tests/objects/tdefaultfieldscheck.nim
@@ -0,0 +1,16 @@
+discard """
+  cmd: "nim check --hints:off $file"
+  errormsg: ""
+  nimout:
+'''
+tdefaultfieldscheck.nim(14, 17) Error: type mismatch: got <string> but expected 'int'
+'''
+"""
+
+
+type
+  Date* = object
+    goal: float = 7
+    name: int = "string"
+
+echo default(Date)