Commit graph

358 commits

Author SHA1 Message Date
Andreas Rumpf
fc0bcccc15 fixes #8230 2018-07-17 16:43:05 +02:00
LemonBoy
217a2cf098 Resolve converter call to constants in case arms (#8336)
Fixes #8333
2018-07-16 16:19:31 +02:00
LemonBoy
2c98b4943e Fix crash with static and anonymous procs (#8171)
Fixes #6077
2018-07-02 00:49:03 +02:00
LemonBoy
7f148838a4 Reject ptr/ref void types (#8127)
Do this during the semantic pass to avoid tripping the following passes.

Fixes #6454
2018-06-27 21:41:40 +02:00
Andreas Rumpf
d8f7174dda
Merge pull request #7736 from cooldome/range_float_type
Language feature: range float types
2018-06-27 00:08:21 +02:00
Zahary Karadjov
e129466910 requested pull-request changes 2018-06-16 16:46:32 +03: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
e719f211c6 fix #6928; fix #7208 2018-06-16 16:46:32 +03:00
Zahary Karadjov
59d19946c0 fix some breakage after rebasing 2018-06-16 16:46:32 +03:00
Zahary Karadjov
16b594b532 Support default type parameters
progress on #7516
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
Zahary Karadjov
a49b06a52a Implement the is operator for the new static and typedesc type classes
This also makes the first baby steps towards a sound treatment of
higher-order kinds (type type int).

Adds test cases showcasing the new features.

* Also fixes breakage after the rebase
2018-06-16 16:46:32 +03:00
Zahary Karadjov
ab9969ed3b Bugfix: the size of an array may be a static tuple element 2018-06-16 16:46:32 +03:00
Zahary Karadjov
509d6e9232 Bugfix: aliases to generic types were not considered implicit generic parameters 2018-06-16 16:46:32 +03:00
Zahary Karadjov
fb27357b62 A minimal patch enabling the new typedesc and static types syntax 2018-06-16 16:46:32 +03:00
Andreas Rumpf
5348fef003 implements a --nep1:on switch to make the compiler enforce the naming conventions outlined in NEP-1 2018-06-13 01:44:19 +02:00
cooldome
37aa488f99 merge devel 2018-06-12 21:19:30 +01:00
cooldome
4d87d666ee manual merge 2018-06-10 23:07:05 +01:00
cooldome
73b7ec9009 merge devel 2018-06-10 22:58:39 +01: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
a4e2b0c153 platform.nim doesn't use globals anymore; prepare msgs.nim for not using globals 2018-05-18 15:18:00 +02:00
Araq
2a7fc84c86 remove ast.emptyNode global; cleanup configuration.nim 2018-05-16 03:06:07 +02:00
Araq
02b78d3f94 make tests green again 2018-05-14 21:38:18 +02:00
Andreas Rumpf
328e7a1005 options.nim: no global variables anymore 2018-05-13 17:52:21 +02:00
Andreas Rumpf
e4c088721a make nimsuggest compile again 2018-05-13 09:53:00 +02:00
Andreas Rumpf
ce859d8c16 more modules compile again 2018-05-12 16:35:59 +02:00
Andreas Rumpf
599b5d6dcb make 'not nil' experimental 2018-05-02 13:34:53 +02:00
cooldome
a95316f78b Implement float range types 2018-04-26 23:47:51 +01:00
Andreas Rumpf
47335aab41 introduce nkTupleConstr AST node for unary tuple construction; breaking change 2018-04-13 17:45:58 +02:00
Andreas Rumpf
4c5351a1eb fixes #6895 2018-04-11 23:26:20 +02:00
Andreas Rumpf
4887f64107 concepts: do not report concept parameters as unused 2018-04-11 14:02:24 +02:00
Oscar Nihlgård
651c0e45da semcheck negative array length (#7518) 2018-04-06 17:05:28 +02:00
zah
121b9e26fb Static[T] fixes (#7333)
* fix the usage of unresolved static[T] parameters in proc signatures
* fix tsametype and tmacrogenerics
* Allow creating composite type classes with concepts and using them in type signatures
* Allow integers to be used in ident concatenations
* Support using imported C++ generic types in proc signatures
* fixes #7230
* closes #7379
* re-enable some metatype tests
2018-03-24 15:28:09 +01:00
Araq
b0994c7f92 better error messages 2018-03-18 12:04:22 +01:00
Andreas Rumpf
12f7b96be0 prevent yet another compiler crash from happening 2018-03-14 11:49:27 +01:00
zah
cbd059aa85 Fix #6415 (#7281)
* hangle static generic params when used in the importcpp pragma

* importcpp works for generic types with fields; fixes #6415

* revert a too agressive safety check that ended up breaking the tests
2018-03-08 15:10:45 +01:00
Oscar Nihlgård
e4515f304a Improve semchecking for duplicate cases in case statements (#7176)
* Improve semchecking for duplicate cases in case statements

* Revert to previous solution

* Improve test
2018-02-24 14:56:17 +01:00
Araq
ef6eda4cb4 better error messages: use <T1, T2> instead of (T1, T2) in order to prevent confusions with tuple types 2018-02-10 20:55:21 +01:00
Araq
5c5e54d3a9 fixes #7153 2018-02-10 14:09:04 +01:00
Andreas Rumpf
e4081a7201 preparations for language extensions: 'sink' and 'lent' types 2018-01-07 23:09:26 +01:00
Araq
e316665b7b work in progress: 'sink' and 'lent' types 2018-01-07 10:17:19 +01:00
Araq
f3a895f043 fixes #6965 2017-12-28 00:50:45 +01:00
Araq
0d744cccc2 make boostrapping work 2017-12-15 16:46:27 +01:00
Araq
14468e2336 make tests green again 2017-11-23 14:37:53 +01:00
Araq
c1ad75fa5c make tests green again 2017-11-23 13:06:02 +01:00
Araq
dee5e63f62 fixes #4686 2017-11-23 02:37:23 +01:00
Araq
a6226d9452 fixes #6682 2017-11-22 23:39:50 +01:00
Araq
2f17be9c22 improve error message for bug #6788 2017-11-22 23:19:12 +01:00
Andreas Rumpf
cae5e33a4a language change: 'generic' and 'atomic' are not keywords anymore 2017-11-21 11:27:35 +01:00
Andreas Rumpf
2d726711fa fixes #6765 2017-11-17 11:40:46 +01:00