mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
* stdlib tests now check refc too * typo * fixes line numbers * disable cpp * do not touch
21 lines
280 B
Nim
21 lines
280 B
Nim
discard """
|
|
matrix: "--mm:refc; --mm:orc"
|
|
targets: "c cpp js"
|
|
"""
|
|
|
|
import std/assertions
|
|
|
|
# bug #20227
|
|
type
|
|
Data = object
|
|
id: int
|
|
|
|
Test = distinct Data
|
|
|
|
Object = object
|
|
data: Test
|
|
|
|
|
|
var x: Object = Object(data: Test(Data(id: 12)))
|
|
doAssert Data(x.data).id == 12
|