Commit Graph

53 Commits

Author SHA1 Message Date
Miran
e7878c0d08 add tests for recently closed issues (#10722) 2019-02-23 10:41:35 +01:00
LemonBoy
cf32d61fa5 Prevent crash on pragma templates w/ generics (#10685)
* Prevent crash on pragma templates w/ generics

* Remove incorrect call to pragma reconversion

`semOverloadedCall` may return a node with more elements than the
original nkCall node had (implicit and/or explicit generics).
2019-02-18 12:17:00 +01:00
LemonBoy
1e88bf1def Misc macro things (#10612)
* Misc cleanup in macro code

Generate error messages using `error` instead of `assert`.

Fixes #10574

* Fix crash with hasCustomPragma on quoted fields

Use the `$` operator instead of reaching for the `strVal` field directly
2019-02-09 18:22:07 +01:00
LemonBoy
26255c72fd Fix getCustomPragmaVal on var fields 2019-02-06 11:34:55 +01:00
Ico Doornekamp
f11f36e7d5 Fixed getCustomPragmaVal to allow multiple fields in custom annotations (#10289) 2019-01-18 09:04:12 +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
Neelesh Chandola
7c5ae00887 exportc is now not allowed for type aliases (#9979) 2019-01-02 20:01:06 +01:00
Timothee Cour
1b7c8482fe fixes #10101 (#10103) 2018-12-27 22:40:09 +01:00
Andreas Rumpf
d9ae9201c4 Merge pull request #9937 from cooldome/pragmablock_custom_pragma
Language feature: implement custom pragmas in pragma blocks
2018-12-12 10:15:25 +01:00
Andrii Riabushenko
1d16676dd6 add test 2018-12-11 23:53:59 +00:00
Araq
4d616b5dc4 make tests green; better output for when megatest execution fails 2018-12-11 21:23:24 +01:00
Andreas Rumpf
ac785b0623 testament: joinable is now an explicit concept of a test spec 2018-12-11 21:23:24 +01:00
Arne Döring
1105d03644 require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
Andrii Riabushenko
5f9234e5cb add comment, fixes #9896 2018-12-08 11:39:11 +00:00
Andrii Riabushenko
94a63eef9a Fix hintXDeclaredButNotUsed for enum fields marked as used 2018-12-08 11:35:18 +00:00
Arne Döring
031bfdec6f make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
LemonBoy
33458894da Fix overload resolution for pragmas evaluation (#8902)
Fixes #6448
Fixes #4384
2018-10-09 19:58:23 +02:00
Andreas Rumpf
9364369c1f make tests green again 2018-09-24 16:00:57 +02:00
Zahary Karadjov
95072fbcc3 Bugfix: custom pragmas were not working on public fields 2018-09-17 22:17:39 +03:00
awr1
eb668003bf Merge branch 'devel' into experimentalize-reorder 2018-09-04 16:33:52 -05:00
awr
89ad1cc9b1 tabling declared() stuff 2018-09-04 16:21:47 -05:00
awr
e6a4213fae transformed {.reorder: on.} into {.experimental: codeReordering.}, added tests 2018-09-04 15:31:38 -05:00
Araq
08c105c4e5 added missing file to make tests green 2018-08-27 11:26:31 +02:00
Araq
c0c8828d9f allow .experimental in a .push/pop environment; refs #8676 2018-08-27 11:20:30 +02:00
LemonBoy
6f13184e40 More checks for custom pragmas placement (#8765)
We're not interested in custom pragmas attached to certain node kinds so
the compiler silently ignored them.
2018-08-25 07:56:05 +02:00
LemonBoy
b1c2416abd Validate pragmas attached to for variables (#8749)
Fixes #8741
2018-08-24 09:40:17 +02:00
Araq
420ed0596b fixes more nil handling regressions 2018-08-13 17:27:44 +02:00
andri lim
9c3336dcff fixes #8371, macros.hasCustomPragma doesn't crash anymore (#8378)
* fixes #8371, macros.hasCustomPragma doesn't crash anymore

* fix macros.hasCustomPragma
2018-07-20 19:48:12 +02:00
cooldome
dec97924a4 Custom pragmas in proc types (#8205) 2018-07-09 12:11:03 +02:00
LemonBoy
584d778318 Fix use of custom pragmas in generic procs (#8165)
Fixes #7626
2018-07-01 08:06:58 +02:00
LemonBoy
f559e62e45 Adjust some tests to make them pass
The non-scoped behaviour of static blocks was exploited by those tests,
replace all the variables declared whithin one with compileTime marked
ones.
2018-06-25 15:56:13 +02:00
Jacek Sieka
72dfe176f5 remove dead code elimination option (#7669) 2018-04-23 11:02:38 +02:00
RSDuck
3402926372 hasCustomPragma/getCustomPragmaVal: small fix (#7650)
* fix hasCustomPragma/getCustomPragmaVal for types without pragma

* fix pragma on pointer test

* removed trailing spaces
2018-04-19 11:07:45 +02:00
RSDuck
3d1d163eff fixes #7451 (#7575) 2018-04-14 08:33:36 +02:00
cooldome
0a8684db4c User pragmas hide effect specs bug fix. Fixes #7216 (#7217) 2018-02-27 03:03:49 +01:00
cooldome
27aab0be16 Custom pragmas in procs bug fix (#7086) 2018-01-18 10:38:55 +01:00
cooldome
2c9e56a783 Implement custom annotations (#6987) 2018-01-09 15:25:22 +01:00
cooldome
53cf0b2c24 Allow noreturn procs with void type (#6973) 2017-12-27 10:09:24 +01:00
cooldome
2b3ec0a7c6 Implement language feature #6885 (#6954) 2017-12-24 22:22:03 +01:00
BigEpsilon
e2af486434 Add sections (type, var, let, const, using) support for reorder pragma (#6326) 2017-10-28 11:33:35 +02:00
Arne Döring
000b8afd26 Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
Arne Döring
52f092d02b Lineinfo change (#6084) 2017-07-17 08:12:15 +02:00
Araq
280941aca6 make tests green again 2017-06-09 13:34:45 +02:00
Fabian Keller
f250c30b9d Make use of used in unittest (#5410) 2017-02-25 21:18:16 +01:00
Fabian Keller
ce4587d7b7 Enabled explicitly unknown lock levels (#5409)
* enabled explicitly unknown lock levels
* allowing "unknown" as locks pragma
* added test case for locks pragma
* updated docs on locks pragma
2017-02-20 09:31:52 +01:00
Araq
8f426b974a new feature: .used pragma to suppress declared-but-not-used warning 2017-02-17 18:03:56 +01:00
Aman Gupta
8450ee9d59 ensure generated c-code matches 2015-09-30 11:42:50 -07:00
Aman Gupta
fa404dc532 better assertions for bitfield behavior 2015-09-29 14:53:34 -07:00
Aman Gupta
5e9ce88daf implement bitsize pragma for bitfields 2015-09-28 14:34:36 -07:00
Adam Strzelecki
e80465dacf tests: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:04:32 +02:00