Commit Graph

2973 Commits

Author SHA1 Message Date
LemonBoy
ba1f036a56 Correctly hash inferred types (#8286)
We don't really want to hash the tyInferred container since that'd make
the "real" type and its inferred counterpart produce different hashes
and types for the very same type.

Fixes #8280
2018-07-12 13:00:11 +02:00
cooldome
231a83a6b1 Fixes #8287 (#8288) 2018-07-12 11:03:08 +02:00
LemonBoy
5c5388c0a6 Handle subtype relations for converter parameters (#8248)
Fixes #7098
2018-07-09 20:05:53 +02:00
Oscar Nihlgård
3b310e91cd New implementations of times.parse & times.format (#8094) 2018-07-09 20:04:25 +02:00
LemonBoy
c6671776a1 Reset typedescMatched before paramTypesMatch (#8250)
The flag should not be carried out across different parameters.

Fixes #7794
2018-07-09 15:02:48 +02:00
cooldome
dec97924a4 Custom pragmas in proc types (#8205) 2018-07-09 12:11:03 +02:00
genotrance
c115090f6e Testament should run tests with no action (#8232)
* Testament should run tests with no action

* Fix strutils tests for JS
2018-07-08 20:38:46 -04:00
LemonBoy
d0b60f1fe3 Generate dynlib strings as a single rope (#8247)
In order not to trip the optimization in genInfixCall we have to do so.
The same trick is also used in setExternName.

Fixes #8241
2018-07-08 22:07:45 +02:00
Dmitry Atamanov
a6c3bbf01a Add proc toOpenArray[byte] for strings (#7820) 2018-07-07 21:03:22 +02:00
LemonBoy
88714e77d8 Fix comparison of tyGenericBody in typerel (#8045)
As shown in #7734 and #7733 the logic in typerel fails to determine that
`type Foo` and `type Foo` are indeed equal.

Fixes #7734
2018-07-07 20:49:06 +02:00
Federico Ceratto
d65429d857 Add normalizePath and tests 2018-07-06 20:21:39 +01:00
Andreas Rumpf
963f431443 Merge branch 'araq-devel' of github.com:nim-lang/Nim into araq-devel 2018-07-06 17:27:02 +02:00
Andreas Rumpf
32230ffe31 make tests green again 2018-07-06 17:26:45 +02:00
Araq
8bcaee1fdf make tmemfile2 work again 2018-07-06 15:53:32 +02:00
Andreas Rumpf
20950ee073 make test green for OSX 2018-07-06 11:26:36 +02:00
Andreas Rumpf
6b8167aaa1 make concepts tests green again 2018-07-06 11:16:05 +02:00
Andreas Rumpf
ae82406c8b make tests green again 2018-07-05 19:14:18 +02:00
Andreas Rumpf
0926754e68 make tests green again 2018-07-05 15:51:04 +02:00
Andreas Rumpf
9b31f67859 turn destructors into finalizers 2018-07-05 11:31:27 +02:00
Andreas Rumpf
86a7054c88 Merge branch 'devel' into araq-devel 2018-07-04 19:25:53 +02:00
LemonBoy
ab47a870bc Error out if vararg match isn't an exact one (#8186)
Fixes #8172
2018-07-03 15:10:12 +02:00
Vindaar
681d8e0749 Deprecate 'c', 'C' prefix for octal literals, fixes #8082 (#8178)
* deprecate `0c`, `0C` prefix for octal literals

Deprecates the previously allowed syntax of `0c` and `0C` as a prefix for
octal literals to bring the literals in line with the behavior of
`parseOct` from parseutils.

* add `msgKind` arg to `lexMessageLitNum` for deprecation messages

* change literal tests to check all valid integer literals

Also adds the `tinvaligintegerlit3` test to test for the (still)
invalid `0O` prefix.
2018-07-03 01:56:36 +02:00
genotrance
70cf286a22 Test case for #6281 (#8190) 2018-07-02 22:53:00 +02:00
Tomohiro
c79f488027 Fix os.unixToNativePath proc returns wrong result(#8179) (#8181)
* Fix os.unixToNativePath proc returns wrong result(#8179)

* Add tests for unixToNativePath
2018-07-02 17:14:26 +02:00
LemonBoy
2c98b4943e Fix crash with static and anonymous procs (#8171)
Fixes #6077
2018-07-02 00:49:03 +02:00
Andreas Rumpf
e455023902 Merge branch 'devel' into araq-devel 2018-07-01 16:24:56 +02:00
LemonBoy
dbbe311e18 Minor changes to discardable handling (#8155) 2018-07-01 15:27:14 +02:00
LemonBoy
584d778318 Fix use of custom pragmas in generic procs (#8165)
Fixes #7626
2018-07-01 08:06:58 +02:00
LemonBoy
eec239e851 Fix constant folding of len() with concept type (#8143)
Fixes #7952
2018-06-30 13:43:55 +02:00
Oscar Nihlgård
7ae9c4358e Fix vm regression (#8163) 2018-06-30 13:38:52 +02:00
Oscar Nihlgård
d146045ed5 Fixes #6689 (#8135) 2018-06-30 09:16:46 +02:00
LemonBoy
0a14b3d198 Check the RHS when building a set (#8159)
Fixes #2669
2018-06-30 09:16:14 +02:00
Oscar Nihlgård
ae69e571e1 VM regression fixes (#8146) 2018-06-29 16:00:53 +02:00
LemonBoy
64c84a7d11 Fix codegen for mInSet magic and empty sets (#8140)
Fixes #8041
2018-06-29 15:10:51 +02:00
Andreas Rumpf
c7298561c1 system.nim: remove deprecated symbols 2018-06-28 07:42:46 +02:00
LemonBoy
cecce80d42 Fix template codegen with static parameters (#8110)
* Fix template codegen with static parameters

Fixes #7477

* Move the test case to tstaticimportcpp
2018-06-27 22:46:46 +02:00
LemonBoy
52fc16d5d2 Return an error symbol as macro output if needed (#8116)
Return an error symbol if the macro output has no type and a typedesc
is expected.

Fixes #7454
2018-06-27 21:43:07 +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
LemonBoy
722abbe9c9 Reject enums with holes when computedGoto is used (#8132)
Fixes #7699
2018-06-27 21:36:52 +02:00
LemonBoy
bb23d903b6 Don't consider concept types as non-complex during codegen (#8119)
Fixes #7125
2018-06-27 17:21:53 +02:00
Hiroki Noda
a85493610c Lexer: do not accept some invalid integer literals (#8089)
* Lexer: do not accept some invalid integer literals

* Use Natural instead of uint, and result variable
2018-06-27 17:07:26 +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
Andreas Rumpf
7cec5d1cfb Merge pull request #7681 from nim-lang/typedesc-reforms
Typedesc reforms
2018-06-26 23:53:30 +02:00
Andreas Rumpf
ccb1514837 Merge pull request #8108 from LemonBoy/fix-5958
Make `static` blocks introduce their own scope
2018-06-26 23:16:40 +02:00
Oscar Nihlgård
236bc06b5f Improve vm support for ref types 2018-06-26 21:25:27 +02:00
Andreas Rumpf
2a3a128e36 Merge branch 'devel' into typedesc-reforms 2018-06-26 18:33:51 +02:00
LemonBoy
f559e62e45 Adjust some tests to make them pass
The non-scoped behaviour of static blocks was exploited by those tests,
replace all the variables declared whithin one with compileTime marked
ones.
2018-06-25 15:56:13 +02:00
LemonBoy
9543689306 Make static blocks introduce their own scope
Treat the static block as a normal block, don't leak any identifier in
the outer scope.

Fixes #5958
2018-06-24 18:27:40 +02:00
LemonBoy
bfa3d62cc1 More concept fixes
Fixes #7705, #7703, #7702
2018-06-24 15:13:34 +02:00
Andreas Rumpf
105a472dc5 Merge pull request #8084 from LemonBoy/fix-7905
Discriminate gensym'd type names in sigHash
2018-06-24 09:54:00 +02:00