* fix#12938 nim compiler assertion fail when literal integer is passed as template argument for array size
* use new flag tfImplicitStatic
* fix
* fix#14193
* correct tfUnresolved add condition
* clean test
It seems that `--stylecheck:error` acts up when the name forwards is involved.
```nim
proc thisOne*(x: var int)
proc thisone(x: var int) = x = 1
```
It cannot understand this at all.
```nim
{.experimental: "strictdefs".}
type
NodeKind = enum
nkImportStmt
nkStmtList
nkNone
PNode = ref object
kind: NodeKind
proc hasImportStmt(n: PNode): bool =
# Checks if the node is an import statement or
# i it contains one
case n.kind
of nkImportStmt:
return true
of nkStmtList:
if false:
return true
else:
result = false
var n = PNode()
echo hasImportStmt(n)
```
It compiles without warnings, but shouldn't. As a contrast,
```nim
{.experimental: "strictdefs".}
type
NodeKind = enum
nkImportStmt
nkStmtList
nkNone
PNode = ref object
kind: NodeKind
proc hasImportStmt(n: PNode): bool =
# Checks if the node is an import statement or
# i it contains one
case n.kind
of nkImportStmt:
result = true
of nkStmtList:
if false:
return true
else:
result = false
var n = PNode()
echo hasImportStmt(n)
```
This gives a proper warning.
* [C++] Member pragma RFC #530
rebase devel
* changes the test so `echo` is not used before Nim is init
* rebase devel
* fixes Error: use explicit initialization of X for clarity [Uninit]
* Play with typeRel
* Temp solution: Fixup call's param types
* Test result type with two generic params
* Asserts
* Tiny cleanup
* Skip sink
* Ignore proc
* Use changeType
* Remove conversion
* Remove last bits of conversion
* Flag
---------
Co-authored-by: SirOlaf <>
* fix server caching issue causing Theme failures
* Fix tester to ignore version cache param
* fix case of people using -d:nimTestsNimdocFixup
* rsttester needed the same fix
* Add test case
* Add in a bounds check when accessing generic types
Removes idnex out of bounds exception when comparing a generic that isn't fully instantiated
* Infer generic bindings
* Simple test
* Add t
* Allow it to work for templates too
* Fix some builds by putting bindings in a template
* Fix builtins
* Slightly more exotic seq test
* Test value-based generics using array
* Pass expectedType into buildBindings
* Put buildBindings into a proc
* Manual entry
* Remove leftover `
* Improve language used in the manual
* Experimental flag and fix basic constructors
* Tiny commend cleanup
* Move to experimental manual
* Use 'kind' so tuples continue to fail like before
* Explicitly disallow tuples
* Table test and document tuples
* Test type reduction
* Disable inferGenericTypes check for CI tests
* Remove tuple info in manual
* Always reduce types. Testing CI
* Fixes
* Ignore tyGenericInst
* Prevent binding already bound generic params
* tyUncheckedArray
* Few more types
* Update manual and check for flag again
* Update tests/generics/treturn_inference.nim
* var candidate, remove flag check again for CI
* Enable check once more
---------
Co-authored-by: SirOlaf <>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes#22301; rejects branch initialization with a runtime discriminator with defaults
* undefault nimPreviewRangeDefault
* fixes tests
* use oldCheckDefault