fixes #2405
This commit is contained in:
parent
d5fc62022a
commit
e680e43fc2
2 changed files with 6 additions and 2 deletions
|
|
@ -1075,9 +1075,11 @@ proc primary(p: var TParser, mode: TPrimaryMode): PNode =
|
|||
getTok(p)
|
||||
of tkGeneric, tkConcept:
|
||||
if mode == pmTypeDef:
|
||||
if p.tok.tokType == tkGeneric:
|
||||
parMessage(p, warnDeprecated, "use 'concept' instead; 'generic'")
|
||||
let wasGeneric = p.tok.tokType == tkGeneric
|
||||
result = parseTypeClass(p)
|
||||
# hack so that it's remembered and can be marked as deprecated in
|
||||
# sem'check:
|
||||
if wasGeneric: result.flags.incl nfBase2
|
||||
else:
|
||||
parMessage(p, errInvalidToken, p.tok)
|
||||
of tkStatic:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue