Merge pull request #8956 from genotrance/devel
Test cases for #6969 #7346 #7581
This commit is contained in:
commit
382fe446c3
4 changed files with 24 additions and 3 deletions
|
|
@ -2,9 +2,9 @@ discard """
|
||||||
output: '''
|
output: '''
|
||||||
tfailedassert_stacktrace.nim(16) tfailedassert_stacktrace
|
tfailedassert_stacktrace.nim(16) tfailedassert_stacktrace
|
||||||
tfailedassert_stacktrace.nim(15) foo
|
tfailedassert_stacktrace.nim(15) foo
|
||||||
system.nim(3777) failedAssertImpl
|
system.nim(3778) failedAssertImpl
|
||||||
system.nim(3770) raiseAssert
|
system.nim(3771) raiseAssert
|
||||||
system.nim(2817) sysFatal
|
system.nim(2818) sysFatal
|
||||||
'''
|
'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
||||||
10
tests/seq/t7346.nim
Normal file
10
tests/seq/t7346.nim
Normal file
|
|
@ -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] = @[]
|
||||||
10
tests/types/t6969.nim
Normal file
10
tests/types/t6969.nim
Normal file
|
|
@ -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
|
||||||
1
tests/types/t7581.nim
Normal file
1
tests/types/t7581.nim
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
discard int -1
|
||||||
Loading…
Add table
Add a link
Reference in a new issue