mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-15 15:44:14 +00:00
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
|
||||
Reference in New Issue
Block a user