summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2018-09-12 20:59:01 +0200
committerGitHub <noreply@github.com>2018-09-12 20:59:01 +0200
commit382fe446c3926f7976de09b7a1d8ad131912c7b6 (patch)
tree55be79fb4dce3c1da8d64a4bb56f0fac32ff0dce
parent8f046792cf30c01cf03d687069baa36b837c62dc (diff)
parentf4356d611585a49de7bce893378c1a997b868005 (diff)
downloadNim-382fe446c3926f7976de09b7a1d8ad131912c7b6.tar.gz
Merge pull request #8956 from genotrance/devel
Test cases for #6969 #7346 #7581
-rw-r--r--tests/assert/tfailedassert_stacktrace.nim6
-rw-r--r--tests/seq/t7346.nim10
-rw-r--r--tests/types/t6969.nim10
-rw-r--r--tests/types/t7581.nim1
4 files changed, 24 insertions, 3 deletions
diff --git a/tests/assert/tfailedassert_stacktrace.nim b/tests/assert/tfailedassert_stacktrace.nim
index a3edeb9bf..43171ef6c 100644
--- a/tests/assert/tfailedassert_stacktrace.nim
+++ b/tests/assert/tfailedassert_stacktrace.nim
@@ -2,9 +2,9 @@ discard """
   output: '''
 tfailedassert_stacktrace.nim(16) tfailedassert_stacktrace
 tfailedassert_stacktrace.nim(15) foo
-system.nim(3777)         failedAssertImpl
-system.nim(3770)         raiseAssert
-system.nim(2817)         sysFatal
+system.nim(3778)         failedAssertImpl
+system.nim(3771)         raiseAssert
+system.nim(2818)         sysFatal
 '''
 """
 
diff --git a/tests/seq/t7346.nim b/tests/seq/t7346.nim
new file mode 100644
index 000000000..ef2fd5b79
--- /dev/null
+++ b/tests/seq/t7346.nim
@@ -0,0 +1,10 @@
+when not defined(nimNewRuntime):
+  {.error: "This bug could only be reproduced with --newruntime".}
+
+type
+  Obj = object
+    a: int
+
+proc `=`(a: var Obj, b: Obj) = discard
+
+let a: seq[Obj] = @[]
\ No newline at end of file
diff --git a/tests/types/t6969.nim b/tests/types/t6969.nim
new file mode 100644
index 000000000..d6ce5e62a
--- /dev/null
+++ b/tests/types/t6969.nim
@@ -0,0 +1,10 @@
+discard """
+errormsg: "invalid type: 'object' for var"
+line: 6
+"""
+
+var a: object a: int
+# or
+var b: ref object a: int
+# or
+var c: ptr object a: int
\ No newline at end of file
diff --git a/tests/types/t7581.nim b/tests/types/t7581.nim
new file mode 100644
index 000000000..796f30271
--- /dev/null
+++ b/tests/types/t7581.nim
@@ -0,0 +1 @@
+discard int -1
\ No newline at end of file