Commit Graph

106 Commits

Author SHA1 Message Date
Saem Ghani
260a5dacb7 fixed dot operator recursive loop & macro suggest (#16922)
* basic stability improvements; refs nimsuggest
* fixed dot operator recursive loop & macro suggest
* hacky fix for run away dot operator sem check

Committing this mostly to make the issue more clear. Perhaps get better
feedback.

* semExprWithType seems like a better place to check
* fixed error messages const case expressions
* Clean-up test
* stopped the dot operator madness

No longer get infinite recursion when seming broken code with a dot
operator macro like in jsffi.

Co-authored-by: Araq <rumpf_a@web.de>
2021-02-15 09:51:05 +01:00
Timothee Cour
e40ff24c23 typeToString: type float => typedesc[float] (#17011)
* typeToString: type float => typedesc[float]

* fixup

* fix tests
2021-02-12 17:10:20 +01:00
flywind
4e1e231e29 fix floats slice (#16853)
* see whether it breaks

* fix

* fix

* minor

* fix

* add enum

* use Ordinal types

* fix tests

* fix

* another style

* fix remainning cases
2021-01-29 12:26:36 +01:00
flywind
e4a529962e close #10735 add testcase (#16690) 2021-01-15 22:23:49 -08:00
flywind
736b0d13c0 close #10734 add testcase (#16692)
* close #10734 add testcase

* fix

* fix
2021-01-12 12:10:22 +01:00
ee7
84fea7c144 strutils.nim: Use func everywhere (#16281)
* strutils.nim: procs with {.noSideEffect.} -> func

* strutils.nim: procs without {.noSideEffect.} -> func

* strutils.nim: proc -> func for links

* strutils.nim: proc -> func in doc comments

* test: add strutils to strictFuncs test

* test: proc -> func in errmsg test
2020-12-07 17:07:12 +01:00
Timothee Cour
31a8cf16bb testament spec: remove errmsg alias of errormsg (#16188) 2020-11-29 17:32:34 -08:00
Andreas Rumpf
122f22d163 asynchttpserver cleanups [backport:1.0] (#15966)
* asynchttpserver cleanups [backport:1.0]
2020-11-15 07:27:13 +01:00
Araq
fa7b12bcf9 makes test green again 2020-11-13 14:18:01 +01:00
Timothee Cour
0fb878324e honor --declaredLocs in more places, including type mismatch errors; also show kind with --declaredLocs (#15673)
* honor --declaredLocs in more places, including type mismatch errors
* fix tests
* show declaration location also when type mismatch names clash
2020-10-27 14:19:28 +01:00
Andreas Rumpf
3b901d1e36 docgen: improve alignment of comments (still not perfect) (#15506)
* docgen: improve alignment of comments (still not perfect)

* fix error message text in `tunknown_named_parameter`

Co-authored-by: narimiran <narimiran@disroot.org>
2020-10-07 14:39:13 +02:00
flywind
086efac49b fix #6608 (#14963)
* fix #6608
2020-07-14 09:22:48 +02:00
Timothee Cour
a6cbe58e8c typetraits.$: $((int, float), int) is now "((int, float), int)" instead of "(tuple of (int, float), int)" (#14812)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-07-02 16:19:43 +02:00
cooldome
e5b64af831 Implement rendering of []=, {}, {}= braces (#14539)
* render curly braces
* fix typo
* fix test

Co-authored-by: cooldome <ariabushenko@bk.ru>
2020-06-01 19:56:17 +02:00
Neelesh Chandola
4c08e64e98 disallow typedesc in arrays & move existing checks to types.typeAllowedAux (#13261)
* disallow typedesc in arrays and move previous checks to types.typeAllowedAux
2020-05-29 11:48:15 +02:00
Araq
7f1d2489ad improve the 'has to be discarded' error message 2020-05-02 22:31:19 +02:00
Andreas Rumpf
73eff1f457 fixes #12741 (#14005)
* fixes #12741
* updated tests
2020-04-19 11:59:01 +02:00
Arne Döring
64ffa17f0f fixes #13715 (#13716)
* fixes #13715

* fix test
2020-03-22 20:01:01 +01:00
Timothee Cour
dd362ab4c0 fix #13538 sigmatch errors are now sorted (#13701)
* fix #13538 sigmatch now sorted and has reliable order

* re-enable tests that were disabled because of that bug

* fix remaining tests and un-disable 2 other tests that were affected by this bug
2020-03-20 09:28:03 +01:00
Andreas Rumpf
83e715c5b6 fixes #5170 (#13589)
* fixes #5170

* make tests green
2020-03-05 16:02:34 +01:00
Timothee Cour
eec07b4e84 fix several bugs with repr (#13386) 2020-02-11 21:33:06 +01:00
Timothee Cour
e4415422fe Revert "printing float values will have one more digit. (#13276) [backport]" (#13363)
This reverts commit b2c6db97f9.
2020-02-08 09:30:24 +01:00
Arne Döring
b2c6db97f9 printing float values will have one more digit. (#13276) [backport]
* printing float values will have one more digit. Fixes #13196
2020-02-07 17:10:25 +01:00
Timothee Cour
79ec8c2571 fix #13182: proc fun(a: varargs[Foo, conv]) now can be overloaded (#13345) [backport] 2020-02-07 13:29:18 +01:00
Neelesh Chandola
7ebb2baa6c Assigning template to var/let/const gives a proper error (#12851)
* Assigning template to var/let/const gives a proper error

* Fix style
2019-12-09 08:19:40 +00:00
narimiran
0d00bde4ea fix failing test 2019-11-07 11:04:41 +01:00
Arne Döring
7cf3395d85 refactor illegal iterator assignment detection (#12212)
* refactor illegal iterator assignment detection

* delete crappy test
2019-10-11 08:43:58 +02:00
Jasper Jenkins
245a954b25 ungeneric unsigned ops (#12230)
* ungenericise unsigned ops, remove nimNewShiftOps
* fix/remove tests
* update t6448
* fix line info
* disable on 32bit
* fix different line info
* add changelog entry
2019-10-11 08:38:08 +02:00
Jasper Jenkins
e5139b0662 error for NimNode index kind (#12154) 2019-09-08 20:31:22 +02:00
Timothee Cour
9ae0dd611f typeToString can now show (recursively) resolved type aliases; fixes #8569 #8083 #8570 (#11678)
* nested typeToString
* typeToString: preferResolved
* add test
* fix test
* preferMixed
* fix tests
2019-08-31 08:26:45 +02:00
Andreas Rumpf
9203d3a982 fixes 5870 (#11704)
* fixes #5870
* make tclosure test green again
* this check is correct but breaks some Nimble packages
2019-08-29 07:49:58 +02:00
Andreas Rumpf
ce7f29e8e6 fixes #11833 (#12018) 2019-08-24 06:25:47 +02:00
Arne Döring
65ed2d7fe8 fixes #11942 (#11945) 2019-08-14 17:41:44 +02:00
Arne Döring
ce148e71ef disallow static in return type (#9686) [nobackport] 2019-08-06 01:26:53 +02:00
Andreas Rumpf
e11494f1cf Merge pull request #11680 from timotheecour/pr_fix_sigmatch_errmsg
fixes #8305; fixes #7808; fixes #10285; fixes #11061 + other bugs with type mismatch error msgs
2019-07-17 16:01:44 +02:00
Araq
fa982b43f0 make tests green again 2019-07-09 13:29:16 +02:00
Timothee Cour
063ae96a66 address comments 2019-07-08 15:24:20 -07:00
Timothee Cour
5ddea6a98f add tests for #8305 #7808 #10285 #11061 + other bugs 2019-07-08 15:24:20 -07:00
Timothee Cour
6375df4c53 make tests/concepts/t3330.nim disabled again: the order of candidates is machine dependent 2019-07-08 15:24:20 -07:00
Timothee Cour
b80d70b0f3 fix tests 2019-07-08 15:24:20 -07:00
Arne Döring
20d0ef8afb [backport] fix #11320 (#11538)
* [backport] fix #11320
* fix test for 32 bit test
2019-07-03 08:00:40 +02:00
Andreas Rumpf
766960dc15 fixes #11515 (#11624)
* fixes #11515

* better fix for #11515; make tests green
2019-07-01 18:08:50 +02:00
Arne Döring
c7e1c665a1 [refactoring] refactor the compiler and stdlib to deprecation warnings (#11419) 2019-06-11 16:49:56 +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