* Early evaluation of mIs
The `evalIs` implementation was just a broken copy of `isOpImpl` so
let's just avoid it alltogether: `mIs` nodes are either resolved during
the semantic phase or bust.
* Remove dead code and tidy it up
* Don't consider tyAnd/tyNot/tyOr/tyAnything as generic
`containsGenericType` was too shallow and didn't check all the branches.
The resulting half-processed nodes are often simplified by the constant
folding pass but when that's not possible we get a nasty error during
codegen.
Fixes#8693
* Move the blame onto the semFold pass
Slightly better evaluation of `is` forms.
* fix#7405 and #8195
* control pushInfoContext in semExprNoType,genStmts via a new hintExtendedContext; make NotesVerbosity computation more DRY
* addressed comments
* call `semExpr` in `semIs` if node is `strLit`, fixes#8129
In case the second son of the node in `semIs` is of kind `strLit`, we
now call `semExpr` to set the `typ` field of that node.
Also removes the `t2 != tyTypeDesc` check in `isOpImpl`, since the
kind of `n[2]` is already assertet with the `internalAssert`.
* reintroduce check for `t2.kind != tyTypeDesc` to fix test case
The `internalAssert` in the `isOpImpl` doesn't check
`n.sons[2].typ.kind` as I previously read, but rather
`n.sons[2].kind`. Therefore the check for `tyTypeDesc` here is
useful. Otherwise the last test case in `isopr.nim` fails.
Also removes the flag `efDetermineType` from the call to `semExpr`.
* late instantiation for the generic procs' default param values
* automatic mixin behaviour in concepts
Other fixes:
* don't render the automatically inserted default params in calls
* better rendering of tyFromExpr
This also makes the first baby steps towards a sound treatment of
higher-order kinds (type type int).
Adds test cases showcasing the new features.
* Also fixes breakage after the rebase
Fixes issue #7997, which was caused by an export of a `release` proc
in `locks`. Thus the `release` in `defined(release)` of the `ifDebug`
template, was of kind `nkSym` instead of `nkIdent`.
We fix this by getting the `PIdent` of the argument to `defined` using
`considerQuotedIdent`.
This has the nice property of also checking for a valid identifier for
us. E.g. `defined(123)` would fail with
```
Error: in expression 'defined(123)': identifier expected, but found
'123'
```
The `localError` is removed, due to a clear distinction between
`declared` and `defined` now.