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:
Andreas Rumpf 2021-02-24 13:17:33 +01:00 • committed by GitHub
commit 6278b5d89a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 528 additions and 59 deletions

View file

@ -211,7 +211,7 @@ proc mapType(typ: PType): TJSTypeKind =
else: result = etyNone
of tyProc: result = etyProc
of tyCString: result = etyString
of tyOptDeprecated: doAssert false
of tyConcept: doAssert false
proc mapType(p: PProc; typ: PType): TJSTypeKind =
result = mapType(typ)