Timothee Cour
7939319379
fix is with generic types; fix genericHead(Foo[T]) ( #13303 )
...
* fix #9855 , fix #9855 , fix genericHead
* render TTypeKind via toHumanStr
2020-02-09 13:48:55 +01:00
Andreas Rumpf
22b2684608
fixes #12148 [backport] ( #12888 )
2019-12-12 11:05:18 +01:00
Clyybber
7e747d11c6
Cosmetic compiler cleanup ( #12718 )
...
* Cleanup compiler code base
* Unify add calls
* Unify len invocations
* Unify range operators
* Fix oversight
* Remove {.procvar.} pragma
* initCandidate -> newCandidate where reasonable
* Unify safeLen calls
2019-11-28 17:13:04 +01:00
Brian Wignall
a7aeabb9d2
[backport] Fix spelling typos ( #12755 )
2019-11-28 08:30:55 +01:00
alaviss
f827d75804
compiler/semcall: return the correct lineinfo for nkCallStrLit ( #12484 )
2019-10-24 18:21:37 +02:00
Federico Ceratto
39290cf88c
Fix spellings ( #12277 ) [backport]
2019-09-27 07:02:54 +02:00
Clyybber
ed1d41c51e
Small ast.nim cleanup ( #12156 )
...
* Remove sonsLen
* Use Indexable
2019-09-09 11:54:15 +02:00
Andreas Rumpf
00d46ca1c0
fixes #12024 ( #12065 )
2019-08-27 20:05:40 +02:00
Arne Döring
65ed2d7fe8
fixes #11942 ( #11945 )
2019-08-14 17:41:44 +02:00
Andreas Rumpf
81ddc67785
[refactoring] compiler: simplified markUsed
2019-08-08 22:43:58 +02:00
Timothee Cour
fda51b6ca2
fix crash on sigmatch ( #11913 )
2019-08-08 14:41:23 +02:00
Andrii Riabushenko
4c73139316
revert changes
2019-07-25 23:18:20 +01:00
Andrii Riabushenko
d7bc4e43a2
fixes #11826
2019-07-25 23:02:04 +01:00
Araq
313cc337f2
fixes a 'nim check' regression
2019-07-19 17:09:11 +02:00
Andreas Rumpf
fbb0642e27
Merge branch 'devel' into araq-detect-unused-imports
2019-07-18 18:16:32 +02:00
Araq
4137a4dbf3
[feature] detect unused imports
2019-07-17 22:36:23 +02:00
Timothee Cour
a6526695f0
fix #8305 #7808 #10285 #11061 + other bugs with type mismatch error msgs
2019-07-08 15:24:20 -07:00
Clyybber
f18b3af9d4
Replace countup(x, y-1) with x ..< y
2019-05-07 12:32:05 +02:00
Araq
cce8d3da27
fixes #10934
2019-03-31 19:59:17 +02:00
Andreas Rumpf
0841c64a32
Merge branch 'devel' into araq-quirky-exceptions
2019-02-08 17:18:17 +01:00
Araq
9fa116b6e1
compiler: don't use 2 spaces in an error message
2019-02-04 15:59:18 +01:00
alaviss
0b02241fc5
semcall: correct lineinfo for accquoted symbols ( #10461 )
2019-01-27 14:58:10 +01:00
alaviss
e962be8981
compiler/sem*: improve lineinfo for qualified and generic procs ( #10427 )
...
Previously the compiler will believe these are where `newSeq` symbol
starts:
newSeq[int]()
^
system.newSeq[int]()
^
This commit moves them back to:
newSeq[int]()
^
system.newSeq[int]()
^
2019-01-23 09:24:21 +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
Andreas Rumpf
cb9110c43d
--define:nimQuirky exception handling for Nim; in preparation of a blog post
2019-01-03 18:56:05 +01:00
cooldome
c5c4da4f3c
Converter bug fixes ( #9700 )
...
* Fixes #9698
* Fixes #9699
2018-11-15 13:14:48 +01:00
Andreas Rumpf
6e8ed8c6fa
added first version of a nimfind tool for the poor souls that don't have a good nimsuggest integretation
2018-11-14 16:04:54 +01:00
Arne Döring
b306e0bfe2
feedback injected
2018-11-08 22:28:29 +01:00
Arne Döring
cba86a9893
fix #9319
2018-11-08 22:28:29 +01:00
Andreas Rumpf
c739b9192f
produce more helpful error messages when overloading resolution fails
2018-11-03 15:56:13 +01:00
Miran
675c629fee
replace deprecated safeAdd with add ( #9416 )
2018-10-18 12:29:32 +02: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
LemonBoy
33458894da
Fix overload resolution for pragmas evaluation ( #8902 )
...
Fixes #6448
Fixes #4384
2018-10-09 19:58:23 +02:00
Araq
0694c9080f
fixes #8043
2018-09-03 16:07:44 +02:00
Araq
7bb93c730e
show all mismatching overloads again
2018-08-27 17:07:12 +02:00
Araq
a60cf221e8
improve the error message for mutability problems that arise from implicit converter calls
2018-08-27 17:07:12 +02:00
Andreas Rumpf
30621c4a89
improve error messages by filtering out highly unlikely mismatches
2018-08-24 00:09:08 +02:00
LemonBoy
b28c7d434b
Update all the default parameters after an instantiation ( #8689 )
...
The old implementation relied on the (now?) wrong assumption that
default-valued parameters can only be placed after the required ones.
Fixes #8683
2018-08-20 16:54:13 +02:00
Andreas Rumpf
dae5450947
WIP: disallow 'nil' for strings and seqs
2018-08-13 11:41:33 +02:00
LemonBoy
c3a9ac4d35
Try conversion to static[T] in generic instantation ( #8443 )
...
Fixes #8439
2018-07-30 10:51:14 +02:00
Zahary Karadjov
31651ecd61
allow referencing other parameters in default parameter values
...
fix #7756
fix #1201
fix #7000
fix #3002
fix #1046
2018-06-16 16:46:32 +03:00
Zahary Karadjov
5bcf8bcb59
fixes #7222 ; fixes #5595 ; fixes #3747
...
* late instantiation for the generic procs' default param values
* automatic mixin behaviour in concepts
Other fixes:
* don't render the automatically inserted default params in calls
* better rendering of tyFromExpr
2018-06-16 16:46:32 +03:00
Andreas Rumpf
40ec7be45c
refactoring: remove idents.legacy global variable and pass the IdentCache around explicitly
2018-05-27 22:09:15 +02:00
Andreas Rumpf
9849808720
Merge branch 'devel' into araq-big-refactoring
2018-05-27 13:38:09 +02:00
Andreas Rumpf
669a564492
remove more global variables in the Nim compiler
2018-05-27 11:10:56 +02:00
Zahary Karadjov
1c478db375
fix #7883 ; fix #7829
2018-05-26 20:46:22 +03:00
Andreas Rumpf
feef109e60
make tests green again
2018-05-18 20:53:41 +02:00
Araq
02b78d3f94
make tests green again
2018-05-14 21:38:18 +02:00
Andreas Rumpf
ce859d8c16
more modules compile again
2018-05-12 16:35:59 +02:00