mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-21 14:55:24 +00:00
* fixes #20856; store defaults directly * fixes * fixes * check * fixes
This commit is contained in:
@@ -105,3 +105,16 @@ block t7244:
|
||||
|
||||
proc test(foo: var Foo) = discard
|
||||
proc test(bar: var Bar) = test(Foo(bar))
|
||||
|
||||
|
||||
import std/macros
|
||||
|
||||
#bug #20856
|
||||
macro ensureImplWorksOnConstr(t: typed): untyped =
|
||||
expectKind(t, nnkObjConstr)
|
||||
doAssert t[0].getTypeInst.getImpl.repr == "A = object"
|
||||
doAssert t[0].getImpl.repr == "A = object"
|
||||
|
||||
type A = object
|
||||
|
||||
ensureImplWorksOnConstr(A())
|
||||
|
||||
Reference in New Issue
Block a user