Commit Graph

68 Commits

Author SHA1 Message Date
narimiran
035427186c fix #8305 #7808 #10285 #11061 + other bugs with type mismatch error msgs
(cherry picked from commit a6526695f0)
(cherry picked from commit b80d70b0f3)
(cherry picked from commit 6375df4c53)
(cherry picked from commit 5fce81edfd)
(cherry picked from commit 5ddea6a98f)
(cherry picked from commit 063ae96a66)
2019-08-13 16:59:44 +02:00
Araq
7c7bab0626 make tests green again
(cherry picked from commit fa982b43f0)
2019-07-15 07:58:26 +02:00
Arne Döring
191b7e0bde [backport] fix #11320 (#11538)
* [backport] fix #11320
* fix test for 32 bit test

(cherry picked from commit 20d0ef8afb)
2019-07-08 11:26:20 +02:00
Andreas Rumpf
476b3b1c13 fixes #11515 (#11624)
* fixes #11515

* better fix for #11515; make tests green

(cherry picked from commit 766960dc15)
2019-07-02 13:57:12 +02:00
Arne Döring
4c8a02165e [refactoring] refactor the compiler and stdlib to deprecation warnings (#11419)
(cherry picked from commit c7e1c665a1)
2019-06-16 17:17:41 +02:00
alaviss
1d00f7f9d7 travis: cleanup & add 32-bit Linux testing (#11337) 2019-05-30 07:34:54 +02:00
Arne Döring
2339542832 Tuple error message (#11141); fixes #3211 2019-05-15 17:59:06 +02:00
Arne Döring
34405db80f forbid casting to bare unchecked array (#11186)
* fixes #11180, forbid casting to unchecked array.
* allow UncheckedArray as param
2019-05-08 09:36:27 +02:00
Jasper Jenkins
6e4ea40475 empty container param error msg (#11158) 2019-05-04 23:28:09 +02:00
Arne Döring
3794338aba Lineinfo fix (#10871) 2019-03-21 06:54:42 +01:00
Miran
2b5e48d807 move assertions and iterators out of system.nim (#10597)
* move assertions and iterators out of system.nim
* limit nimsuggest tests to the first 3 suggestions
2019-03-07 00:49:39 +01:00
Andreas Rumpf
84f0a33bf0 make typeToString sane for sequence again 2019-02-25 19:01:01 +01:00
LemonBoy
e89aaaeaab Open a new scope for static: expr blocks (#10649)
Bring this in line with how plain blocks are analysed and avoids codegen
errors if one references variables defined in such a block.
2019-02-23 12:05:07 +01:00
Arne Döring
6b9a139f7f error message for accidental use of macro (#10490)
* error message for accidental use of macro
2019-02-19 12:21:42 +01:00
Arne Döring
28394153ab 32 bit fixes (#10608) 2019-02-13 23:30:14 +01:00
Araq
4ed7507cb2 error messages can have spaces, don't be dyslexic 2019-02-08 12:18:42 +01:00
LemonBoy
6b88ce3384 Stop useless suggestion of unsafeAddr (#10598)
Fixes #10594
2019-02-08 08:59:38 +01:00
Timothee Cour
4d230db5ab closes #8610 ; adds test case (#10454) 2019-01-25 19:28:03 +01:00
LemonBoy
3ea099bc7f Finalizer proc must be global (#10388)
Fixes #10376
2019-01-22 07:35:52 +01:00
Oscar Nihlgård
9a003bae06 Fix error lexer error messages for to large numbers (#10394) 2019-01-21 15:14:38 +01:00
narimiran
be6456f0f4 better docs: strutils 2019-01-16 09:45:51 +01:00
Timothee Cour
6ce3949c8a add isNamedTuple; make $(1, 2) be (1, 2) instead of (Field0: 1, Field1: 2) which leaked implementation detail (#10070)
* add `isNamedTuple`; make $(1, 2) be (1, 2) instead of leaking implementation detail (Field0: 1, Field1: 2)
  fixes this: #8670 (comment) /cc @alehander42 @Vindaar @mratsim

* Note: isNamedTuple is useful in other places, eg #10010 (comment)

* move isNamedTuple to helpers.nim to avoid exposing new symbol to system.nim

* remove workaround in tests/vm/tissues.nim failing test now that #10218 was makes it work
2019-01-08 18:37:25 -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
Timothee Cour
1b7c8482fe fixes #10101 (#10103) 2018-12-27 22:40:09 +01:00
Arne Döring
a5ecbf823f lots of small changes 2018-12-11 21:23:22 +01:00
Arne Döring
3859878db8 megatest checks output and nimout 2018-12-11 21:23:22 +01:00
Arne Döring
1105d03644 require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
Neelesh Chandola
e44641b6cb Float values are invalid in enum 2018-12-09 14:20:01 +05:30
Neelesh Chandola
d977fc6f32 Fix test case expected output 2018-12-09 11:20:52 +05:30
Neelesh Chandola
93503c18aa Add test 2018-12-09 10:33:20 +05:30
Arne Döring
2f13d27720 improve line info retreival (#9822)
* improve line info
* fix error message
2018-11-30 08:12:11 +01:00
Araq
610283b9b0 fixes #9764 2018-11-23 09:54:57 +01:00
Timothee Cour
eb946f37a7 fixes #8671; show helpful msg (lookup symbol, eg iterator) on 'attempting to call undeclared routine' error (#8786) 2018-10-14 01:16:04 +02:00
Dheepak Krishnamurthy
70018aa683 Add checks for except: body blocks (#9191) 2018-10-09 14:09:22 +02:00
Andreas Rumpf
9364369c1f make tests green again 2018-09-24 16:00:57 +02:00
Ganesh Viswanathan
e07a256f74 Test case for #6483 2018-09-14 14:04:32 -05:00
Araq
0694c9080f fixes #8043 2018-09-03 16:07:44 +02:00
Araq
1abef2dc59 improve the error message for 'addQuitProc' etc; fixes #5794 2018-09-03 12:27:23 +02:00
Araq
9c3cba1c22 fixes #4766 2018-08-28 15:41:55 +02:00
LemonBoy
b5171f57ef Expand tyAlias in typeToString (#8634)
Fixes #8339
2018-08-18 15:27:47 +02:00
skilchen
becb6743f8 fixes #8434 (incomplete info in errmsg about 'required type') (#8441) 2018-07-30 10:41:59 +02:00
Andreas Rumpf
0926754e68 make tests green again 2018-07-05 15:51:04 +02:00
genotrance
70cf286a22 Test case for #6281 (#8190) 2018-07-02 22:53:00 +02:00
Yuriy Glukhov
7e7b85afc7 Allow stacktrace and linetrace pragmas on procs 2018-06-12 12:31:14 +03:00
Yuriy Glukhov
8f06763491 Fixes #6803 2018-06-11 22:38:40 +03:00
Araq
02b78d3f94 make tests green again 2018-05-14 21:38:18 +02:00
Andreas Rumpf
84c4e7a502 make tests green again 2018-04-28 10:00:31 +02:00
Andreas Rumpf
14e496fab0 fixes #6393 2018-04-21 22:49:15 +02:00
genotrance
b9cafe5752 test case for #1154 (#7648) 2018-04-18 21:19:48 +02:00
Andreas Rumpf
a17d45c2c2 fixes #3948 2018-04-12 20:09:44 +02:00