mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
21 lines
305 B
Nim
21 lines
305 B
Nim
discard """
|
|
errormsg: "Base method 'zzz' requires explicit '{.gcsafe.}' to be GC-safe"
|
|
line: 10
|
|
"""
|
|
|
|
type
|
|
A = ref object of RootObj
|
|
B = ref object of A
|
|
|
|
method zzz(a: A) {.base.} =
|
|
discard
|
|
|
|
var s: seq[int]
|
|
method zzz(a: B) =
|
|
echo s
|
|
|
|
proc xxx(someObj: A) {.gcsafe.} =
|
|
someObj.zzz()
|
|
|
|
xxx(B())
|