Oscar Nihlgård
255698deee
Fix semfold handling of {.str/int/bool-define.} ( #13964 )
2020-04-13 14:22:33 +02:00
cooldome
8ba915e449
error msg for #13864 ( #13962 )
...
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-04-13 14:17:22 +02:00
Timothee Cour
814f150184
fix #13848 : make var result work with nim cpp ( #13959 )
...
* fix #13848
* add exhaustive tests for var result
2020-04-13 14:16:06 +02:00
Hessam Mehr
bff742cd8b
Add support for zig cc as C compiler. ( #13757 )
2020-04-08 15:24:14 +02:00
cooldome
b4e9f8e814
fix ICE in isUnresolvedSym ( #13925 )
...
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-04-08 13:16:25 +01:00
cooldome
f86fc5316a
fix #13909 ( #13914 ) [backport:1.2]
...
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-04-08 11:28:09 +02:00
Timothee Cour
95fd8ae93c
fix #13902 distinct uint64 type corruption on 32-bit with borrow ( #13907 ) [backport:1.2]
...
* fix #13902 distinct uint64 type corruption on 32-bit with borrow
Co-authored-by: Timothee Cour <timothee.cour2+lightsail@gmail.com >
2020-04-08 09:56:16 +02:00
cooldome
c835c8c4e7
fix #13910 ( #13917 )
...
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-04-07 19:40:14 +02:00
Timothee Cour
ab5e26c53c
fix some codegen bugs: NIM_BOOL, NIM_STATIC_ASSERT, --passc:-std=... (etc) ( #13798 )
...
* fix cgen bool D20200328T203812
* --passc:std=c++17 (etc) now works instead of silently ignored
* document caveats for NIM_NIL
2020-04-07 15:17:30 +02:00
Arne Döring
37692baf49
fix #13739 ( #13742 )
2020-04-07 14:42:59 +02:00
Timothee Cour
f1fd3ef7f4
fix https://github.com/timotheecour/Nim/issues/88 ( #13865 ) [backport:1.2]
2020-04-06 00:24:35 +02:00
Timothee Cour
29734b73ff
add nimPath to nim dump ( #13876 )
...
* add nimPath to nim dump
* rename
2020-04-05 16:44:34 +02:00
cooldome
6d4f07f2ea
Fix sym owner in wrapper proc ( #13878 )
...
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-04-05 16:44:15 +02:00
Andreas Rumpf
a890aa75aa
finally de-deprecate the .define and .undef pragmas
2020-04-04 23:12:24 +02:00
Andreas Rumpf
9c46927fad
new feature: ability to turn specific warnings to errors
2020-04-04 22:56:03 +02:00
Alexander Ivanov
cec320b569
Remove my wrongly written mangled-related code, not needed anymore ( #13858 )
2020-04-03 20:22:03 +02:00
Alexander Ivanov
920add5880
sourcemaps for the JS codegen ( #7508 )
2020-04-03 12:06:23 +02:00
Andreas Rumpf
2b3b24a804
make bootstrapping more robust for people who have Nim inside /usr/bin ( #13855 )
2020-04-03 10:25:15 +02:00
Timothee Cour
93cd98dd14
move tinyc to a separate repo and allow installing external dependencency (eg tinyc) from koch / library code ( #13850 )
...
* remove tinyc
* installDeps
* update tinyc paths
2020-04-03 09:10:45 +02:00
Araq
d01fca974d
added an .assert pragma and mentioned the pragmas in the changelog
2020-04-02 12:57:32 +02:00
Timothee Cour
68539a2926
fix last remaining warning when building nim (intVal should be Int128) + minor cleanups ( #13841 )
2020-04-02 08:53:52 +02:00
Juan Carlos
afd0afe0a3
Deprecate when declared(echo):echo ( #13840 )
2020-04-02 02:56:18 +02:00
Andreas Rumpf
bc37668c5a
fixes #13782 ( #13834 )
2020-04-01 20:30:28 +02:00
Zahary Karadjov
66f18037b3
Fix tests/types/tparameterizedparent0
2020-04-01 19:38:44 +02:00
Zahary Karadjov
08afa03075
The raises list can now use expressions referencing the generic params
2020-04-01 19:38:44 +02:00
Zahary Karadjov
be95f8fdfa
Turn some of the errors back into warnings
2020-04-01 19:38:44 +02:00
Zahary Karadjov
ce9a4ed124
Replace tfHasRequiresInit with a more accurate mechanism
...
The new mechanism can deal with more complex scenarios such as
not nil field appearing in a non-default case object branch or
a field within a generic object that may depend on a when branch.
The commit also plugs another hole: the user is no longer able
to create illegal default values through seq.setLen(N).
2020-04-01 19:38:44 +02:00
Zahary Karadjov
d374c6373b
Fix tests/parallel/tguard2.nim
2020-04-01 19:38:44 +02:00
Zahary Karadjov
2b66d66567
Fix a CI failure during koch doc
2020-04-01 19:38:44 +02:00
Zahary Karadjov
e63b673ce2
Fix https://github.com/nim-lang/Nim/issues/4907
2020-04-01 19:38:44 +02:00
Zahary Karadjov
4f3d309fb0
Perform nil checks during object construction and within compiles()
...
Close https://github.com/nim-lang/Nim/issues/6494
2020-04-01 19:38:44 +02:00
Zahary Karadjov
7b7e42be54
More precise error messages for uninitialized fields in the presence of inheritance
2020-04-01 19:38:44 +02:00
Zahary Karadjov
f3be5a716f
not nil types are illegal to construct through default(T)
2020-04-01 19:38:44 +02:00
Zahary Karadjov
1b570f2b18
Turn the warning for uninitialized (result) variables into errors
2020-04-01 19:38:44 +02:00
Zahary Karadjov
54f06427c8
Enable the requiresInit checks only for objects
2020-04-01 19:38:44 +02:00
Zahary Karadjov
8ae48292ff
Plug another hole: default(T) forbidden for objects requiring initialization
2020-04-01 19:38:44 +02:00
Zahary Karadjov
05a0ec4adb
Don't allow 'var x: T' for objects that require initialization
2020-04-01 19:38:44 +02:00
Zahary Karadjov
7652aede41
More sophistication; Allow requiresInit to be specified per-field
2020-04-01 19:38:44 +02:00
Zahary Karadjov
a8b6222c86
First steps, the compiler can boot with enforced requiresInit
2020-04-01 19:38:44 +02:00
Timothee Cour
216fd59c44
make usage of foo is a user-defined error more informative ( #13833 )
2020-04-01 17:49:29 +02:00
Timothee Cour
d3020af44d
fix open file leak when running --debugger:native ( #13832 )
2020-04-01 17:48:17 +02:00
lbartoletti
567af54baf
Add arm/arm64 for FreeBSD ( #13822 )
...
* Add arm and arm64 for FreeBSD
* Add arm64 with aarch64 and reorder to avoid conflict with arm
2020-03-31 22:55:25 +02:00
Andreas Rumpf
9ffec79300
DrNim (Nim compiler with Z3 integration) ( #13743 )
...
* code cleanups and feature additions
* added basic test and koch/CI integration
* make it build on Unix
* DrNim: now buildable on Unix, only takes 10 minutes, enjoy
* added basic documentation for DrNim which can also be seen as the RFC we're following
* drnim: change the build setup so that drnim.exe ends up in bin/
* makes simple floating point ranges work
* added basic float range check
* drnim: teach Z3 about Nim's range types plus code refactoring
* drnim: make unsigned numbers work
* added and fixed index checking under setLen
* first implementation of .ensures, .invariant and .assume (.requires still missing and so is proc type compatibility checking
* drnim: .requires checking implemented
* drnim: implemented .ensures properly
* more impressive test involving min()
* drnim: check for proc type compatibility and base method compatibility wrt .requires and .ensures
* testament: support for 'pattern <directory>
* koch: uses new <directory> feature of testament
* drnim: added tiny musings about 'old'
* Make testament work with old SSL versions
* koch: add support for 'koch drnim -d:release'
* drnim: preparations for the param.old notation
2020-03-31 22:54:48 +02:00
cooldome
c70b3952ff
fixes #13810 ( #13821 )
...
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-03-31 21:15:06 +02:00
Andreas Rumpf
9134bb9cfb
macros for proc types, macros for types ( #13778 )
...
* new minor feature: macros for proc types, to be documented
* Finished the implementation and added tests
* [skip ci] Describe the new custom pragmas in the manual and the changelog
Co-authored-by: Zahary Karadjov <zahary@gmail.com >
2020-03-31 21:14:05 +02:00
Timothee Cour
19cab9fa51
stacktraces can now show custom runtime msgs per frame ( #13351 )
...
* stacktraces can now show custom runtime msgs
* improve tests/stdlib/tstackframes.nim
* fix test for --gc:arc
* test --stacktraceMsgs:on and --stacktraceMsgs:off
* --stacktracemsgs:off by default
2020-03-30 13:45:32 +02:00
Andreas Rumpf
2a278f6eba
'.push raises: []' now also affects proc types ( #13776 )
...
* '.push raises: []' now also affects proc types
* fixes the regression
* less disruptive bugfix
* another attempt
2020-03-29 22:00:18 +02:00
Timothee Cour
cfa1a827dc
fix #13730 ( #13787 )
2020-03-28 08:51:16 +01:00
Andreas Rumpf
0a49fe5fad
fixes #13763 ( #13777 )
2020-03-27 12:14:57 +01:00
cooldome
289b31ee75
make nim_temp compile with --gc:arc --sinkInference:off ( #13769 )
...
* make nim_temp compiler with --gc:arc
* trigger build
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-03-26 20:15:38 +01:00