* fixes #20856; store defaults directly * fixes * fixes * check * fixes
This commit is contained in:
parent
cdbf5b4699
commit
1707bc4a99
3 changed files with 16 additions and 10 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue