This commit is contained in:
recloser 2018-12-15 22:57:18 +01:00
commit 19f5835d5c
2 changed files with 33 additions and 33 deletions

View file

@ -54,3 +54,20 @@ let test2 = test1
echo toJSON(test1)
echo toJSON(test2)
block issue10005:
type
Player = ref object of RootObj
id*: string
nickname*: string
color*: string
proc newPlayer(nickname: string, color: string): Player =
let pl = Player(color: "#123", nickname: nickname)
return Player(
id: "foo",
nickname: nickname,
color: color,
)
doAssert newPlayer("foo", "#1232").nickname == "foo"