new syntax for lvalue references: var b {.byaddr.} = expr (#13508)
* new syntax for lvalue references: `var b {.byaddr.} = expr`
* on type mismatch, `???(0, 0)` not shown anymore
* * compiler now lowers `var a: {.foo.}: MyType = expr` to foo(a, MyType, expr)
* new pragmas.byaddr defined in pure library code exploiting this lowering
* skip `template foo() {.pragma.}`
This commit is contained in:
parent
fa06203e90
commit
913bc95964
4 changed files with 139 additions and 1 deletions
|
|
@ -149,7 +149,7 @@ echo f
|
|||
- `std/oswalkdir` was buggy, it's now deprecated and reuses `std/os` procs
|
||||
- `net.newContext` now performs SSL Certificate checking on Linux and OSX.
|
||||
Define `nimDisableCertificateValidation` to disable it globally.
|
||||
|
||||
- new syntax for lvalue references: `var b {.byaddr.} = expr` enabled by `import pragmas`
|
||||
|
||||
## Language additions
|
||||
|
||||
|
|
@ -159,6 +159,9 @@ echo f
|
|||
- `=sink` type bound operator is now optional. Compiler can now use combination
|
||||
of `=destroy` and `copyMem` to move objects efficiently.
|
||||
|
||||
- `var a {.foo.}: MyType = expr` now lowers to `foo(a, MyType, expr)` for non builtin pragmas,
|
||||
enabling things like lvalue references, see `pragmas.byaddr`
|
||||
|
||||
## Language changes
|
||||
|
||||
- Unsigned integer operators have been fixed to allow promotion of the first operand.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue