summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #11159 from JasperJenkins/const-named-tuple-unpackAndreas Rumpf2019-05-081-1/+2
|\ | | | | Const named tuple unpacking
| * handle in semConstJasper Jenkins2019-05-051-1/+2
| |
* | Replace countup(x, y) with x .. yClyybber2019-05-071-5/+5
| |
* | Replace countup(x, y-1) with x ..< yClyybber2019-05-071-16/+16
|/
* discard type is an error, fixes #7470 (#11146)Jasper Jenkins2019-05-011-1/+1
|
* added system.unown to make 'owned' sane to use in practice; later on we ↵Araq2019-04-291-4/+8
| | | | might change the type inference rules to make it more convenient
* revert discardable transformation (#10905)Andreas Rumpf2019-04-211-14/+10
| | | | | | | | | | * Revert "Properly wrap discarded statements (#10322)" This reverts commit 15584879b91e14565156ca140eef1dc100cf34c4. * add test for implicit discard after defer * enable t10241 again * make C++ tests green again
* destructors: internal compiler refactoringAraq2019-04-181-7/+7
|
* remove shadow warning, fixes #10732 (#11039)Miran2019-04-171-16/+4
|
* sem'check understands 'owned procs'Araq2019-04-111-1/+6
|
* Fix astdef typ deref (#10245)Alexander Ivanov2019-04-051-1/+1
|
* fixes destructor tuple regression #10940 (#10941)cooldome2019-04-041-1/+1
| | | | | | | | * fixes #10940 * bug fixes * fix spacing
* Pure ref object; fixes #10721 (#10955)Arne Döring2019-04-041-0/+2
|
* more destructor based changes (#10885)Andreas Rumpf2019-03-231-14/+20
| | | | | | | | | | | * mark user defined destructors with sfOverriden to simplify the logic * refactoring in preparation to merge liftings and generic instantiations for destructors * ast: introduce nkHiddenTryStmt for destructor generation in order to be able to optimize better the code later on * renamed 'patterns' switch to 'trmacros' as it was totally misleading before * destructors: introduce tfCheckedForDestructor flag in preparation of strict =destroy checking * test for invalid/too late destructor introductions * liftdestructors: make code robust for nimsuggest * --newruntime works for hello world again * newruntime: code generation for closures
* mark user defined destructors with sfOverriden to simplify the logicAndreas Rumpf2019-03-191-0/+3
|
* rename: semasgn -> liftdestructorsAndreas Rumpf2019-03-141-1/+1
|
* fixes #10791Andreas Rumpf2019-03-061-0/+3
|
* special typing rules for owned pointersAndreas Rumpf2019-03-041-0/+4
|
* gc:destructors: progressAndreas Rumpf2019-02-281-0/+1
|
* Tuple unpacking now works for `for` vars (#10152)Neelesh Chandola2019-02-231-16/+54
| | | | | | | | * Tuple unpacking now works for `for` vars * Give error if length of tuple vars != length of tuple * Fix error message showing wrong tuple length * unpacking now works now for mutable items * Update changelog
* first steps in implementing 'owned' pointers; undocumented, do not useAndreas Rumpf2019-02-231-7/+7
|
* error message for accidental use of macro (#10490)Arne Döring2019-02-191-2/+9
| | | | * error message for accidental use of macro
* fixes #10702 (#10705)Andreas Rumpf2019-02-181-19/+22
| | | | | | * --define:nimQuirky exception handling for Nim; in preparation of a blog post * make it work with latest system.nim * make code more readable * fixes #10702
* Print missing case labels (#10600)Arne Döring2019-02-091-0/+3
|
* Avoid evaluating macros twice in type sections (#10550)LemonBoy2019-02-061-0/+5
| | | Fixes #10548
* gc: destructors is beginning to work (#10483)Andreas Rumpf2019-01-291-1/+2
| | | | | | | | | | | | | | | | * kochdocs.nim: code cleanup * docgen: nicer indentation * parser.nim: code cleanup * fixes #10458 * make tests green again * make =destroy mixins * gc:destructors: produced C code is almost working * --gc:destructors simple program compiles (but leaks memory) * gc:destructors make examples compile in C++ mode * destructors: string implementation bugfixes * strs.nim: minor code cleanup * destructors: builtin seqs are beginning to work * remove debugging helpers
* Harmonize the var/let and const handling (#10410)LemonBoy2019-01-231-4/+14
| | | Fixes #10333
* Fix semantic analysis with noReturn proc in tail pos (#10422)LemonBoy2019-01-231-1/+2
| | | Fixes #10417
* Fix compileTime pragma applying to whole var/let section (#10389)Neelesh Chandola2019-01-221-6/+4
|
* Correct lineinfo for accent quoted symbols in proc definition (#10399)alaviss2019-01-211-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * compiler/parser: preserve lineinfo for accent quoted symbols Previously the lineinfo for symbol $$$ in this example is: proc `$$$` ^ After this commit: proc `$$$` ^ * compiler/semstmts: correct lineinfo for accent quoted idents Previously nimsuggest would highlight this as: proc `$$$` ^~~ After this commit: proc `$$$` ^~~ * nimsuggest/tests: add a test for accent quoted proc Disabled by default
* destructors: first step towards fixing #9617 (#10341)cooldome2019-01-181-2/+15
|
* Properly wrap discarded statements (#10322)LemonBoy2019-01-171-10/+14
| | | | | | Failing to do so lead the codegen to emit invalid code sometimes, especially when C++ references were involved. Fixes #10241
* typed/untyped return type is invalid for everything except templates and ↵Neelesh Chandola2019-01-151-3/+0
| | | | macros (#10275)
* add custom pragma support for var and let symbols (#9582)jcosborn2019-01-071-4/+19
| | | | | | * add custom pragma support for var and let symbols * updated changelog for custom pragmas on var and let symbols * add oldast switch for backwards compatibility
* exportc is now not allowed for type aliases (#9979)Neelesh Chandola2019-01-021-0/+2
|
* Deprecate gc v2 (#10151)Neelesh Chandola2019-01-011-1/+1
| | | | | | * Deprecate gc v2 * warnDeprecated now has custom messages
* Check there are no side effects before optimizing away compile time ↵deech2018-12-311-0/+2
| | | | expressions. (#9934)
* Fix const tuple unpacking not working for variables > 2 (#10099)Neelesh Chandola2018-12-271-1/+1
|
* fixes nim-lang/nimsuggest#76 (#10093)alaviss2018-12-251-1/+11
| | | | | | | | * nimsuggest: prevent out-of-bound access * fixes nim-lang/nimsuggest#76 * undo tester changes
* much simpler implementation of constant tuple declarationsAndreas Rumpf2018-12-191-12/+12
|
* Const tuple unpacking (#9964)Neelesh Chandola2018-12-191-19/+41
| | | | | | | | | | * tuple unpacking is now supported for consts * Move nkConstTuple to the end of TNodeKind * Add nnkConstTuple in macros.nim * Fix Formatting
* Fixes #3060 and adds error checking for invalid else branches in object ↵Andreas Rumpf2018-12-191-7/+0
|\ | | | | | | | | | | | | | | | | | | | | | | variants (#9957) * Fix semRecordCase * Fix ftpclient.nim * Check for ordinal type * Check tyRange for exhaustiveness
| * Merge remote-tracking branch 'upstream/devel' into record-caseNeelesh Chandola2018-12-131-1/+3
| |\
| * | Fix semRecordCaseNeelesh Chandola2018-12-131-7/+0
| | |
* | | --gc:destructors: baby stepsAndreas Rumpf2018-12-151-0/+9
| | |
* | | better error message for 'proc' that is not intended to be used as a typeclassAndreas Rumpf2018-12-151-4/+8
| |/ |/|
* | Give error when case has an else branch even though all cases are already ↵Neelesh Chandola2018-12-131-1/+3
|/ | | | | | | | | covered (#9930) * Give error when case has an else branch even though all cases are already covered. * Don't check for invalid else for type tyFloat..tyFloat128, tyString, tyError * Remove unnecessary else in unittest.nim * Fix sockets.nim
* custom pragmas in pragma blocksAndrii Riabushenko2018-12-111-7/+5
|
* Merge pull request #9911 from nc-x/fixes-#9627Andreas Rumpf2018-12-091-7/+23
|\ | | | | `include` now accepts collective arguments
| * `include` now accepts collective argumentsNeelesh Chandola2018-12-091-7/+23
| |