Commit Graph

13 Commits

Author SHA1 Message Date
ringabout
4d11d0619d complete std prefixes for stdlib (#22887)
follow up https://github.com/nim-lang/Nim/pull/22851
follow up https://github.com/nim-lang/Nim/pull/22873
2023-10-30 17:03:04 +01:00
ringabout
ef29987781 An unnamed break in a block now gives an UnnamedBreak warning (#20901)
* unnamed break in the block now gives an error

* bootstrap

* fixes

* more fixes

* break with label

* label again

* one moee

* Delete test5.txt

* it now gives a UnnamedBreak warning

* change the URL of bump back to the original one
2022-11-24 07:31:47 +01:00
Timothee Cour
d1447fe25d major improvements to std/wrapnils: optimal codegen, case objects, lvalue semantics (#18435)
* wrapnils now generates optimal code; also handles case objects
* changelog
* unsafeAddr => addr
2021-07-07 06:04:36 +02:00
Timothee Cour
79ded694d7 avoid re-exporting options from std/wrapnils (#18222) 2021-06-10 07:00:34 +02:00
Andreas Rumpf
a9b62de895 CIs: attempt to use csources_v1 (#16282)
* CIs: attempt to use csources_v1
* also updated the BSDs
* also updated azure pipelines
* std modules should not itself use the 'std/' import dir...
* compiler has to be careful with std/ for v1 booting
2021-04-21 07:41:33 +02:00
flywind
dcd3f26876 clean up wrapnils 2021-02-25 17:52:58 +08:00
Timothee Cour
bea037f856 refs #17114: workaround for arm64 which should segfault but does not (#17178)
* refs #17114: workaround for arm64 which should segfault but does not
* fixup
* Update lib/std/wrapnils.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-02-25 08:40:43 +01:00
Timothee Cour
8942586fa6 wrapnils: add ??. which returns an Option (#16931)
* wrapnils: add option-like API with ??., isSome, get
* fix test after rebase
* cleanups
* fix changelog
* address comments regarding get vs unsafeGet
2021-02-24 14:02:32 +01:00
Timothee Cour
f3e4c4d6e1 std/wrapnils does not use experimental:dotOperators anymore (#16996) 2021-02-10 18:50:50 +01:00
flywind
d447c0fe3f use typeof instead type (#16962) 2021-02-08 09:46:07 +01:00
Timothee Cour
ae9ba260f6 clarify docs for wrapnils (#16929)
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
2021-02-04 15:39:19 -08:00
Jacek Sieka
7d6cbf290a Error -> Defect for defects (#13908)
* Error -> Defect for defects

The distinction between Error and Defect is subjective,
context-dependent and somewhat arbitrary, so when looking at an
exception, it's hard to guess what it is - this happens often when
looking at a `raises` list _without_ opening the corresponding
definition and digging through layers of inheritance.

With the help of a little consistency in naming, it's at least possible
to start disentangling the two error types and the standard lib can set
a good example here.
2020-04-28 19:56:01 +02:00
Timothee Cour
f6ba4e81b0 maybe: allows optional chaining of field access and indexing when LHS i snil (#13023)
* maybe: allows optional chaining
* fix tools/kochdocs.nim
* improve semantics to distinguish valid from invalid values
* for now, wrapnil, isValid, unwrap are not exported
2020-01-18 12:24:56 +01:00