diff --git a/tests/seq/t7346.nim b/tests/seq/t7346.nim new file mode 100644 index 0000000000..ef2fd5b799 --- /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 0000000000..d6ce5e62af --- /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 0000000000..796f30271e --- /dev/null +++ b/tests/types/t7581.nim @@ -0,0 +1 @@ +discard int -1 \ No newline at end of file