Commit Graph

2779 Commits

Author SHA1 Message Date
Andreas Rumpf
c08efb4c51 implements first version of for-loop macros 2018-04-15 01:07:28 +02:00
RSDuck
3d1d163eff fixes #7451 (#7575) 2018-04-14 08:33:36 +02:00
Andreas Rumpf
6ae9341d48 make JS tests green again 2018-04-14 00:54:15 +02:00
Andreas Rumpf
d7cc9016f3 fixes #4470 2018-04-13 23:41:31 +02:00
Andreas Rumpf
47335aab41 introduce nkTupleConstr AST node for unary tuple construction; breaking change 2018-04-13 17:45:58 +02:00
Zahary Karadjov
10142e4a80 Fix some usages of typedesc in async procs
This also fixes a compilation error in modules, based only on the
new async module (i.e. not importing the full asyncdispatch)
2018-04-13 13:31:55 +03:00
Oscar Nihlgård
f6df2d9956 Sub second time resolution (#6978)
* Add deprecation warnings to recently deprecated procs

* Fix bad usage of the times module

* Introduce sub second resolution

* Fix usage of C's time()

* Switch to nanosecond resolution

* Make Time & Duration opaque again and fix some errors

* Change back to TimeInterval for shorthands

* Fix JS test

* Fix build error for windows

* Undeprecate epochTime

* Documentation and minor changes

* Lots of bugfixes and doc comments

* Attempt to make travis & appveyor green

* Fix edge cases for dealing with the local timezone

* Workaround JS backend overflow/underflow bug

* Use better workaround for not knowing the size of time_t

* Use all available timezones for tests

* Fix indentation

* Add procs for accessing the fractional part of a duration

* Order time units from smallest to largest since it makes more sense

* Include months and years in `TimeUnit`

* Review fix
2018-04-13 07:36:30 +02:00
Andreas Rumpf
a17d45c2c2 fixes #3948 2018-04-12 20:09:44 +02:00
PMunch
4f1725ad61 Add column number to instantiation info (#7376)
* Add column number to instantiation info

Instantiation info left out column number for no good reason. This adds
it in as the third element of the tuple.

* Fix test that failed and added change to changelog

An assertion test failed because it was declaring a type that was
expected to be populated by instantiationInfo with the old signature.

Also added the changes to the changelog as it is a breaking change.
2018-04-12 20:02:04 +02:00
Xiao-Yong
f543388959 unittest: default no color if stdout is not a tty (#7424)
We accept a new environment variable, NIMTEST_COLOR,
which override the effect of NIMTEST_NO_COLOR.
The environment variable, NIMTEST_COLOR, can be 'never'
or 'always', which set the color output to false or true,
respectively.
2018-04-12 17:57:34 +02:00
treeform
f3db632b1d Added count(*) support to sql parser. Fixed warnings in sql parser. (#7490) 2018-04-12 17:49:24 +02:00
genotrance
c3cc52087f Added a few useful os calls to VM (#7440) 2018-04-12 13:59:14 +02:00
Arne Döring
6baca58693 Get symbol kind (#7491) 2018-04-11 16:48:01 +02:00
genotrance
f6c8f97fe8 Add a few useful os calls to nimscript (#7442) 2018-04-10 18:50:23 +02:00
cooldome
16c1a90857 Cpp codegen: handling of imported exceptions. Fixes #3571 (#7360) 2018-04-10 12:14:59 +02:00
Oscar Nihlgård
427490a845 Fix compile time set cardinality (#7558) 2018-04-10 10:38:16 +02:00
Araq
8ae0ac8637 make tests green again 2018-04-07 00:39:33 +02:00
Oscar Nihlgård
d6793ded27 Fix parser bug with type classes (#7480) 2018-04-06 22:44:54 +02:00
Araq
8b7c2bd067 fixes #7528 2018-04-06 22:42:25 +02:00
Araq
212fdc5946 added the 'x.p[:T]' notation for explicit generic instantiations in combination with the ddot calling syntax 2018-04-06 22:05:57 +02:00
Oscar Nihlgård
651c0e45da semcheck negative array length (#7518) 2018-04-06 17:05:28 +02:00
Araq
aa6353e4fa fixes #6843 2018-04-06 13:10:22 +02:00
Araq
824092be31 fixes a regression about static object case variant checking 2018-04-06 13:01:24 +02:00
cooldome
c34cb101b8 Fixes #7407 (#7427) 2018-04-06 10:53:21 +02:00
Dmitry Atamanov
cf6d41b51d Fixes #5281 (#7489) 2018-04-06 10:09:05 +02:00
Dominik Picheta
58dc8a399e Merge pull request #7450 from cabhishek/devel
Fixes #6902
2018-04-04 22:36:18 +01:00
Arne Döring
5d46e1eaa2 Fixes #7473 (#7475)
* removed code duplication
* changelog entry, adopt tests for changes
2018-04-04 15:37:07 +02:00
Dominik Picheta
7ef0cfebb5 Merge pull request #7495 from GULPF/fix-fill-bug
Fix algorithm.fill for empty input
2018-04-04 13:54:40 +01:00
Oscar Nihlgård
da077eea7c Move algorithm tests away from koch 2018-04-04 13:00:51 +02:00
Dominik Picheta
39c71d6211 Merge pull request #7336 from yglukhov/ipaddr-sockaddr-conversions
Conversion procs for (IpAddress, Port) <-> (SockAddr, Socklen)
2018-04-02 14:31:05 +01:00
data-man
759023e157 Comparing datetimes 2018-04-01 00:41:38 +03:00
Abhishek Kapatkar
c7cba5e6f0 Fixes #6902 2018-03-30 13:43:01 -07:00
Dominik Picheta
9c2cdc94a2 Fixes #7433. 2018-03-29 11:57:53 +01:00
cooldome
bcda71a8a7 fixes #7414 (#7434) 2018-03-29 09:19:03 +02:00
Araq
1d9343080d added toOpenArray builtin for zero-copy slices; syntax sugar yet to come 2018-03-24 20:26:34 +01: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
Andreas Rumpf
299e944cf7 fixes the 'var T' checking 2018-03-24 10:10:28 +01:00
Andreas Rumpf
3be4f9111c enforce 'var T' produces a view into the first parameter; refs #7373 2018-03-24 09:41:04 +01:00
Andreas Rumpf
6f747674be more checking for 'var T' as return type; refs #7373 2018-03-24 08:37:09 +01:00
cooldome
e2c2ae8e7e fixes #7392 (#7395) 2018-03-23 13:28:22 +01:00
cooldome
23230572e2 Fixes #7363 (#7371) 2018-03-20 11:14:47 +01:00
Araq
e83bce3f13 disable flaky fragmenation test for AppVeyor 2018-03-19 17:42:52 +01:00
Araq
3979e83a59 fixes #7331 2018-03-18 17:56:28 +01:00
jcosborn
e39f2a9283 fix allocator corruption for large sizes (#7338)
* fix allocator corruption for large sizes
* allow large chunks to coalesce and added test case
* use correct constants in MaxBigChunkSize
2018-03-17 23:59:04 +01:00
andri lim
19164929ed fixes #7347, asyncfile.getFileSize (#7354)
* fixes #7347

* fixes #7347
2018-03-17 15:21:22 +00:00
cooldome
70b28a39fe Codegen: use type forward declarations more aggresively. Fixes #7339 (#7340)
Do not emit object definition it if used only by ref or ptr
2018-03-16 16:21:03 +01:00
PMunch
a9f21cffdf Add CommentStmt to astGenRepr (#7313)
* Added codeRepr and dumpCode to the macros module.

This allows those writing macros to write examples, get the code to generate the AST for that example, and then modify that code to be dynamic with the macro function.
2018-03-16 15:57:40 +01:00
andri lim
4f9f9ea528 fixes #7332 (#7341) 2018-03-16 15:32:01 +01:00
Yuriy Glukhov
1bd0efb067 Fixed crash/interface. Added tests. 2018-03-15 15:49:41 +02: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