* fixes #10203 * make typredef test green again * fixes the regressions differently
This commit is contained in:
parent
06a8b48811
commit
05c52ff34f
3 changed files with 34 additions and 16 deletions
|
|
@ -17,3 +17,23 @@ suite "object basic methods":
|
|||
check($obj == "(foo: 1)")
|
||||
test "it should test equality based on fields":
|
||||
check(makeObj(1) == makeObj(1))
|
||||
|
||||
# bug #10203
|
||||
|
||||
type
|
||||
TMyObj = TYourObj
|
||||
TYourObj = object of RootObj
|
||||
x, y: int
|
||||
|
||||
proc init: TYourObj =
|
||||
result.x = 0
|
||||
result.y = -1
|
||||
|
||||
proc f(x: var TYourObj) =
|
||||
discard
|
||||
|
||||
var m: TMyObj = init()
|
||||
f(m)
|
||||
|
||||
var a: TYourObj = m
|
||||
var b: TMyObj = a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue