Timothee Cour
23c1ee982e
add alignTable, parseTableCells to align/format a tab(etc) delimited table ( #10182 )
...
* add compiler/unittest_light.nim for easy diffing: assertEquals and mismatch
* fixup
* add alignTable, parseTableCells
2019-01-09 09:46:44 +01:00
Timothee Cour
fc7fcca9df
fix leftover comment from #9766
2019-01-08 17:07:46 -08:00
Timothee Cour
bf3a308e86
[error messages, stacktraces] fix #8794 #9270 #9767 #9768 ( #9766 )
...
* fixes #8794 : `Error: undeclared field: 'foo'` should show type (+ where type is defined) (hard to guess in generic code)
* fixes #9270 : `--listFullPaths` not honored by `declared in foo.nim` messages
* fixes #9767 : VM stacktrace doesn't honor --excessiveStackTrace:on
* fixes #9768 : VM stacktrace misses column info, can lead to ambiguous or harder to read stacktraces
* refactors some col+1 code to col + ColOffset (self documents code)
* make getProcHeader show declared info location also for types and all routine kinds (including macros,templates) instead of just (rather arbitrarily) for iterator,proc,func,method
* --listFullPaths now is honored in more places
* fix typo system/except.nim => lib/system/excpt.nim
* remove substr(foo, 0) hack in compiler/vm.nim which seems old and not applicable anymore
2019-01-08 15:58:47 -08:00
Neelesh Chandola
fb26b95f81
{.deprecated: msg.} now works for vars and lets ( #10234 )
2019-01-08 19:44:47 +01:00
Clyybber
427435a814
Don't use deprecated pragma syntax ( #10187 )
...
* Don't use deprecated pragma syntax
* Remove pure pragma, since it's a noop now
2019-01-08 10:13:39 +01:00
Arne Döring
abad758a7e
Fix for sizeof bitsize combination ( #10227 )
...
* fix #10082
* added test
2019-01-07 18:09:57 +01:00
Neelesh Chandola
387831d657
Show error when trying to export individual enum field ( #10109 )
2019-01-07 16:02:47 +01:00
jcosborn
044cef152f
add custom pragma support for var and let symbols ( #9582 )
...
* 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
2019-01-07 12:36:06 +01:00
zah
87f8ec5b92
Fix #10073 ( #10218 )
2019-01-07 12:10:54 +01:00
Miran
5345c5b130
remove deprecated modules ( #10215 )
...
* removed from `compiler`:
* lists (deprecated 2 years ago)
* removed from `lib` (all deprecated 3 years ago):
* ssl
* matchers
* httpserver
* removed from `lib/deprecated`:
* unsigned
* actors (and three accompanying tests)
* parseurl
* moved to `lib/deprecated`:
* securehash (the reason for not directly removing - it was deprecated (only) one year ago)
2019-01-07 10:37:49 +01:00
Neelesh Chandola
e77dd683eb
Fix defer not not-working at top level ( #10191 )
2019-01-07 00:51:17 +01:00
Neelesh Chandola
e9a192c36f
expandFilename on windows is now consistent with other platforms ( #10154 )
2019-01-04 15:11:48 +01:00
Araq
5101b6befd
fixes #10188
2019-01-04 13:39:54 +01:00
Araq
086229459a
runnableExamples: compile and test them as a single file; fixes #9300
2019-01-04 09:52:22 +01:00
Neelesh Chandola
7c5ae00887
exportc is now not allowed for type aliases ( #9979 )
2019-01-02 20:01:06 +01:00
Timothee Cour
a1e268e3dc
[cleanup] remove dead code compiler.options.mergeConfigs ( #10165 )
2019-01-02 10:26:40 +01:00
Neelesh Chandola
6ed9676af5
Show field not initialized warning only when notnil used ( #10155 )
2019-01-01 18:49:44 +01:00
Neelesh Chandola
9faad7591e
Deprecate gc v2 ( #10151 )
...
* Deprecate gc v2
* warnDeprecated now has custom messages
2019-01-01 13:50:48 +01:00
cooldome
7c90e22ddd
fixes #10148 ( #10149 )
...
* fixes #10148
* fix a typo
2018-12-31 22:57:09 +01:00
Timothee Cour
ab72d68ec8
fix off by 1 error in col shown by toFileLineCol ( #10138 )
...
* fix off by 1 error in `col` shown by toFileLineCol
* fix test failures
2018-12-31 15:42:01 +01:00
deech
e87910197a
Check there are no side effects before optimizing away compile time expressions. ( #9934 )
2018-12-31 14:41:24 +01:00
Neelesh Chandola
bcbe317d17
Before showing deprecated warning, check whether enum field was marked deprecated or the whole enum type ( #10135 )
2018-12-30 18:34:41 +01:00
cooldome
82c009a2cb
Dead code elimination for entire modules and their init procs if empty ( #10032 )
...
* fixes #9798
* Change order of write modules
* Move datInit calls ahead of initStackBottom
2018-12-30 11:28:12 +01:00
Neelesh Chandola
cbbdcb2669
Show deprecation warning for fields of a deprecated enum ( #10112 )
...
* Show deprecation warning for fields of a deprecated enum
* Add test
2018-12-30 09:45:39 +01:00
Neelesh Chandola
c5ad4c10cb
Deprecated pragma is now supported on enum fields ( #10113 )
...
* {.deprecated.} pragma is now supported for enum fields
* Add tests
* Simplify code
2018-12-30 09:43:59 +01:00
Timothee Cour
a6633b9658
fix typetraits.$ regression https://github.com/c-blake/cligen/issues/84 ( #10131 )
...
* fix typetraits.`$` regression https://github.com/c-blake/cligen/issues/84
* add test
2018-12-30 09:40:21 +01:00
Alexander Ivanov
aadbdd6b06
Support undefined in isNil ( #9960 )
2018-12-30 02:48:37 +01:00
Andreas Rumpf
062d7e3a39
fixes #10082
2018-12-30 02:45:43 +01:00
Neelesh Chandola
527b774772
{.push raises: [].} is now ignored for vars/lets/consts ( #10026 )
2018-12-30 01:28:56 +01:00
Timothee Cour
e98d54b050
nim dump: add nimcache entry ( #10122 )
2018-12-30 01:27:37 +01:00
Timothee Cour
9c65ea0d16
nim c now allows: when defined(c) (#10130 )
2018-12-30 01:21:33 +01:00
Timothee Cour
0831292863
revives: Move typetraits.$ to system. Fixes #5827 ( #10071 )
...
* Move typetraits.`$` to system. Fixes #5827 .
* revive PR; adjust code to make sure everything works and add tests
* fix tests/concepts/tstackconcept.nim
* address comments
2018-12-30 01:09:47 +01:00
Timothee Cour
1b7c8482fe
fixes #10101 ( #10103 )
2018-12-27 22:40:09 +01:00
Neelesh Chandola
05b8085a87
Pragma syntax is now consistent ( #9993 )
...
* Give deprecation warning when type pragmas do not follow the type name
* pragma before generic parameter list in type definition is now deprecated
* Update changelog
* Fix bug where deprecated warning was being shown even though no generic param list was present
* Fix bug
* Use errGenerated
* Best attempt at writing the grammar
2018-12-27 22:38:24 +01:00
Neelesh Chandola
65a52ecebb
Fix const tuple unpacking not working for variables > 2 ( #10099 )
2018-12-27 00:50:33 +01:00
alaviss
58d293d6a9
fixes nim-lang/nimsuggest#76 ( #10093 )
...
* nimsuggest: prevent out-of-bound access
* fixes nim-lang/nimsuggest#76
* undo tester changes
2018-12-25 21:08:16 +01:00
Araq
d407af565f
fixes #10024
2018-12-22 23:13:05 +01:00
Araq
bdb67201b2
fixes #10033 [backport]
2018-12-22 18:39:20 +01:00
Araq
237085db5d
C++ tests: make DLL test green
2018-12-21 22:03:41 +01:00
Araq
4a6d699bc5
C++: make async tests green on Windows
2018-12-21 22:03:41 +01:00
Timothee Cour
52e36a19a9
fix #9933 ( #10067 )
2018-12-21 12:29:45 +01:00
Araq
23448a96cc
fixes #10058 [backport]
2018-12-21 11:50:24 +01:00
Andreas Rumpf
2fd522cf58
use anon structs and unions for a much better debug experience ( #10055 )
2018-12-20 11:44:26 +01:00
rec
ca18dc2505
Make copies for params which are captured in closures. Fixes #7048 ( #10050 )
...
* Copy params which are captured in closures. Fixes #7048
* Forgot to emit a newline; minor adjustments to the test
2018-12-20 08:24:57 +01:00
Araq
c129107b32
make nimrtl.dll compile for the C++ target
2018-12-19 18:06:28 +01:00
Neelesh Chandola
730b1b2b87
proc does not take untyped/typed as argument ( #9981 )
...
* proc does not take untyped/typed as argument
* Add TODO
2018-12-19 16:18:57 +01:00
Andreas Rumpf
3300c8a500
much simpler implementation of constant tuple declarations
2018-12-19 11:11:33 +01:00
Neelesh Chandola
8e90ed0618
Const tuple unpacking ( #9964 )
...
* tuple unpacking is now supported for consts
* Move nkConstTuple to the end of TNodeKind
* Add nnkConstTuple in macros.nim
* Fix Formatting
2018-12-19 10:52:41 +01:00
Andreas Rumpf
3f917c8d91
Merge pull request #9959 from nc-x/better-error-message
...
Better error messages in enums which don't have ordinal types
2018-12-19 10:03:55 +01:00
Andreas Rumpf
72500420d3
Fixes #3060 and adds error checking for invalid else branches in object variants ( #9957 )
...
* Fix semRecordCase
* Fix ftpclient.nim
* Check for ordinal type
* Check tyRange for exhaustiveness
2018-12-19 10:03:22 +01:00