Zahary Karadjov
8cd5f1f8f5
introduce tyInferred for the unbound concept type params
...
* Why is tyInferred needed?
The bindings in TCandidate are capable of inferring types within a single
call expression. In concepts, we need to infer types in the same way, but
across the whole body of the concept.
Previously, once a concept type param was inferred, it was destructively
mutated using t.assignType, but this proved to be problematic in the presence
of overloads, because the bindings established while a non-matching overload
is tested must be reverted/forgotten. tyInferred offers a non-destructive way to
keep track of the inference progress.
While introducing new types usually requires a lot of code paths in the compiler
to updated, currently tyInferred is only a short-lived type within the concept body
pass and it's unlikely to introduce breakage elsewhere in the compiler.
2017-03-24 16:58:15 +02:00
Zahary Karadjov
815724db71
support the full range of type modifiers when declaring concept vars and testing proc signatures
2017-03-24 16:58:15 +02:00
Zahary Karadjov
0a9a878bd3
support for matching generic types' procs in generic concepts
2017-03-24 16:58:15 +02:00
Zahary Karadjov
33f4e69759
support for accessing types and consts defined in concepts with the dot operator
2017-03-24 16:58:15 +02:00
Zahary Karadjov
eab1d0cc02
support for accessing the inferred concept type params with the dot operator
2017-03-24 16:58:15 +02:00
Zahary Karadjov
66e0f0e19c
concept type params inference working in basic examples
2017-03-24 16:58:15 +02:00
Andreas Rumpf
0d8a503e45
fixes #5597 ; wrong eager template instantiation in generic context ( #5601 )
2017-03-24 07:35:12 +01:00
andri lim
568c954062
fixes #5241 , fixes #5411 inherit from specialized generic typeRel problem ( #5573 )
2017-03-23 23:39:29 +01:00
def
ab31b776ef
Fix typo
2017-03-23 21:29:10 +01:00
Araq
93f0f1c6e4
fixes #5598
2017-03-23 16:43:21 +01:00
Emery Hemingway
d508303fad
fix empty link file list during external compilation ( #5577 )
2017-03-23 13:27:16 +01:00
zah
be174fc3c7
Fix generic forward declarations; fixes #4104 ; fixes #4908 ( #5566 )
2017-03-23 12:40:57 +01:00
Araq
e01d2244e4
make semObjConstr robust for nimsuggest
2017-03-21 13:02:38 +01:00
Andreas Rumpf
2d0ee2c8ab
mark symbols in getAst context as used
2017-03-20 11:44:58 +01:00
Andreas Rumpf
a6b0af539b
revert getAst handling to not use overloading resolution
2017-03-20 10:56:15 +01:00
Andreas Rumpf
01b2728ec8
fixes a potential endless loop
2017-03-20 10:56:15 +01:00
Andreas Rumpf
3fafd546d5
nimsuggest: prefixes of abbreviations don't count
2017-03-20 10:56:15 +01:00
jcosborn
3bffb3ba35
fix getTypeImpl for tyEnum ( #5568 )
...
* fixed getTypeImpl for tyEnum
* fixed getType for enum and updated release notes about change
2017-03-19 20:34:27 +01:00
zah
1d6018726e
fix #5296 ( #5565 )
2017-03-19 20:33:21 +01:00
Araq
aa4260ffa8
overloading resolution for getAst; breaking change
2017-03-18 20:57:45 +01:00
Andreas Rumpf
242fb3240f
fixes #5228
2017-03-18 13:59:35 +01:00
zah
a20a8e6adb
fixes #4756 ( #5557 )
2017-03-17 17:11:37 +01:00
Eugene Kabanov
9c99973ff8
Make DragonFlyBSD a first class BSD-like OS ( #5548 )
2017-03-16 14:47:53 +01:00
andri lim
e99721a593
fixes #5360 , fixes #5238 ( #5539 ); fixes type alias inequality for types coming from templates/macros
2017-03-16 08:04:36 +01:00
Silvio
51cd3bd86f
Fixes #5062 ( #5527 ); JS: holes in enums
2017-03-15 10:33:37 +01:00
andri lim
ebb15505dd
fixes #5231 inheriting from partial specialized generic object ( #5538 )
2017-03-15 07:59:34 +01:00
andri lim
0ff1190fe7
fixes #5264 ( #5520 ); inheriting from generic object
2017-03-14 21:40:09 +01:00
Araq
b1c494a150
Merge branch 'devel' of github.com:nim-lang/Nim into devel
2017-03-14 15:56:08 +01:00
Araq
142b604c13
fixes #5529 ; don't merge type visibility flags
2017-03-14 15:55:23 +01:00
Andreas Rumpf
f7d760cb94
nimsuggest: when invoked with a directory, detect the main nim file on its own
2017-03-14 12:28:15 +01:00
Andreas Rumpf
b414806e66
nimsuggest: suggest types in a type section
2017-03-14 11:21:35 +01:00
Andreas Rumpf
f162ff7773
nimsuggest: make tdot1 test case green again
2017-03-14 10:28:50 +01:00
Andreas Rumpf
4912300ca7
Merge branch 'devel' into faster-nimsuggest
2017-03-14 10:18:20 +01:00
zah
650b20dc5e
fix varargs forwarding for templates; fixes #5455 ( #5505 )
...
* fix varargs forwarding for templates; fixes #5455
* document the macros' varargs change in the news for 0.16.2
2017-03-13 22:02:11 +01:00
zah
1be0022e7c
Fixes #5167 and related problems ( #5475 )
...
This commit returns to a bit less strict checking of the number
of macro arguments, because some old immediate macros rely on a
behavior where even the arity of the macro is not being checked.
It may be better if such macros are just declared to use varargs[expr],
but this remains for another day.
2017-03-12 09:33:49 +01:00
zah
6e358e3187
don't allow casting to non-concrete types; fixes #5428 ( #5502 )
2017-03-12 09:27:05 +01:00
Andreas Rumpf
2430fc7d82
nimsuggest: special rule for 'of' completion in case statements
2017-03-10 14:42:11 +01:00
Andreas Rumpf
c5566f7c37
nimsuggest: make 'con' work again
2017-03-10 13:20:32 +01:00
Andreas Rumpf
68181e6da2
nimsuggest: maxresults limit; fixed local symbol usages priorizations
2017-03-10 11:29:16 +01:00
Zahary Karadjov
62ef5dfec8
new debugging helper to replace and friends
2017-03-10 12:02:55 +02:00
Andreas Rumpf
db888475dc
nimsuggest: make tests green again
2017-03-10 09:57:36 +01:00
Araq
556b564c7d
nimsuggest: make tests green again
2017-03-10 00:18:24 +01:00
Araq
57ea01309e
nimsuggest: more things work
2017-03-09 17:09:39 +01:00
Araq
4755795416
nimsuggest: more precise cursor tracking
2017-03-09 14:58:14 +01:00
Andreas Rumpf
da821a22d9
nimsuggest: revert cpFuzzy bailouts
2017-03-09 11:30:36 +01:00
Araq
4d0d6c47bd
bugfix: consider type contexts properly
2017-03-08 15:59:34 +01:00
Araq
0f63c101e4
fixes nimsuggest bug #45
2017-03-08 13:21:40 +01:00
Araq
1887390b0f
nimsuggest: fixes nimsuggest bug #45 ; do not show suggestions in string literals or comments
2017-03-08 12:53:21 +01:00
Andreas Rumpf
507feb3ce5
Merge branch 'devel' into faster-nimsuggest
2017-03-08 00:39:13 +01:00
Andreas Rumpf
91a4b448fd
nimsuggest: chk checks the full project lazily; much better suggestions orderings
2017-03-08 00:38:48 +01:00