new-style concepts implementation, WIP (#15251)
* fixes #15210 [backport:1.2] * make tests green * make ordinal work * makes Swapable test compile * make Indexable example work * concepts: 'self' is now 'Self' * concepts: make Dictionary example compile * document the new concept implementation * concepts: make typeDesc work properly * concepts: allow documentation comments (d'oh)
This commit is contained in:
parent
3f38f8fbb7
commit
6278b5d89a
19 changed files with 528 additions and 59 deletions
|
|
@ -2076,7 +2076,7 @@ proc semIterator(c: PContext, n: PNode): PNode =
|
|||
incl(s.typ.flags, tfCapturesEnv)
|
||||
else:
|
||||
s.typ.callConv = ccInline
|
||||
if n[bodyPos].kind == nkEmpty and s.magic == mNone:
|
||||
if n[bodyPos].kind == nkEmpty and s.magic == mNone and c.inConceptDecl == 0:
|
||||
localError(c.config, n.info, errImplOfXexpected % s.name.s)
|
||||
if optOwnedRefs in c.config.globalOptions and result.typ != nil:
|
||||
result.typ = makeVarType(c, result.typ, tyOwned)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue