mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-28 11:26:39 +00:00
* fixes #10203 * make typredef test green again * fixes the regressions differently
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user