cooldome
46bfb590c8
fixes #13281 ( #13282 )
...
* fixes ##13281
* add comment to test
2020-01-28 14:55:54 +01:00
Miran
352232e62d
style fix: change 'JS' to 'js' to make it consistent ( #13168 )
2020-01-16 14:14:03 +01:00
Andreas Rumpf
0e7338d65c
better support for PROGMEM like annotations for lets/vars; fixes #12216 ( #12799 )
2019-12-05 13:45:16 +01:00
narimiran
c6a451c584
remove unused imports from tests
2019-11-06 14:35:45 +01:00
Andreas Rumpf
3ba3307d61
remove deprecated procs ( #12535 )
2019-11-05 11:05:46 +01:00
Arne Döring
7cf3395d85
refactor illegal iterator assignment detection ( #12212 )
...
* refactor illegal iterator assignment detection
* delete crappy test
2019-10-11 08:43:58 +02:00
Andreas Rumpf
5a03eea518
revert #12100 ; typeof(nil) is weird enough, don't allow it as the return type
2019-09-02 17:48:06 +02:00
Albert Safin
efe1bed82e
Allow typeof(nil) as a return type
2019-08-31 10:16:26 +00:00
Oscar Nihlgård
bcfb540e57
Allow typeof(nil) as generic parameter ( #11869 )
2019-08-03 10:16:07 +02:00
Andreas Rumpf
19b142401c
fixes #11525
2019-06-26 23:15:58 +02:00
Araq
795044ed2b
make tests green again
2019-05-27 21:29:02 +02:00
Arne Döring
f94ec363ab
Allow void macro result ( #11286 )
...
* allow void macro result
* add test for void macro result type
2019-05-21 21:31:40 +02:00
Araq
22881a3543
closes #9825
2019-05-10 11:43:58 +02:00
Clyybber
a4f531c243
Add testcase for #9684 ( #11221 )
2019-05-10 08:03:48 +02:00
Clyybber
6be9b98e35
Fix #9844 ( #11216 )
...
* Fixes #9844
2019-05-09 22:58:41 +02:00
jcosborn
b1091f85d4
fixes #9578 ( #11176 )
...
* fixes #9578
* fixed and expanded test
2019-05-06 09:34:03 +02:00
Araq
0ecaaa85e9
fixes #9403
2019-05-05 16:08:16 +02:00
Miran
ce152ed91f
iterators: several small fixes ( #11162 )
...
* fix pairs, mpairs, mitems for cstring for JS backend
* add mutation check for pairs and mpairs for strings and seqs
* change the assertion message - modifying (changing elements) is not
a problem, changing the length is
2019-05-04 23:02:50 +02:00
Arne Döring
a55817f9ac
Fix varargs int32 ( #11054 )
...
* fixes #10999
* adds a test for #10999
2019-04-18 20:53:57 +02:00
Miran
43832f8e57
remove shadow warning, fixes #10732 ( #11039 )
2019-04-17 11:54:51 +02:00
LemonBoy
631a8ab57f
Fix edge case in type hashing ( #10601 ) [backport]
...
Empty types introduced by a template produced the same hash of the
"clean" type sharing the same name.
2019-02-08 09:56:32 +01:00
Miran
268197add8
properly deprecate parseopt2 ( #10452 )
2019-01-25 13:13:55 +01:00
Timothee Cour
6ce3949c8a
add isNamedTuple; make $(1, 2) be (1, 2) instead of (Field0: 1, Field1: 2) which leaked implementation detail ( #10070 )
...
* add `isNamedTuple`; make $(1, 2) be (1, 2) instead of leaking implementation detail (Field0: 1, Field1: 2)
fixes this: #8670 (comment) /cc @alehander42 @Vindaar @mratsim
* Note: isNamedTuple is useful in other places, eg #10010 (comment)
* move isNamedTuple to helpers.nim to avoid exposing new symbol to system.nim
* remove workaround in tests/vm/tissues.nim failing test now that #10218 was makes it work
2019-01-08 18:37:25 -08:00
cooldome
82c009a2cb
Dead code elimination for entire modules and their init procs if empty ( #10032 )
...
* fixes #9798
* Change order of write modules
* Move datInit calls ahead of initStackBottom
2018-12-30 11:28:12 +01:00
Arne Döring
a5ecbf823f
lots of small changes
2018-12-11 21:23:22 +01:00
Arne Döring
3859878db8
megatest checks output and nimout
2018-12-11 21:23:22 +01:00
Arne Döring
2a4c09ff88
megatest can be executed
2018-12-11 21:23:21 +01:00
Arne Döring
1105d03644
require errormsg to be specified before file.
2018-12-11 21:23:21 +01:00
Arne Döring
a29ec40032
join simple test
2018-11-23 11:58:32 +01:00
Arne Döring
031bfdec6f
make run the default action of a test in tester
2018-11-23 11:58:28 +01:00
Araq
7ae6b7e9a2
make more tests green for C++; refs #7870
2018-10-30 16:52:33 +01:00
Araq
81e33b9d87
make thavlak and tmarkerproc_regression tests take fewer iterations in order to speedup the CIs
2018-10-17 13:20:45 +02:00
Miran
749dbce4c6
Merge tests into a larger file (part 5 of ∞) ( #9368 )
...
* merge magics
* merge metatype tests
* merge method tests
* merge objects tests
* change `import future` to `import sugar`
Nim in Action tests are left with `import future`, to ensure compatibility.
* merge overload tests
* merge proc tests
* merge procvar tests
* merge range tests
* merge seq tests
* merge sets tests
* remove wrong assert from `tsets3`
* fix `jsTests`
* better fix
2018-10-16 10:50:10 +02:00
cooldome
7a5b614edc
fixes #9297 ( #9298 )
...
* fixes #9297
* improve spacing
2018-10-11 09:54:50 +02:00
LemonBoy
7775b7efd1
Fix wrong heuristic in codegen ( #9293 )
...
A bare return may trigger the insertion of a genericReset.
Fixes #9286
2018-10-11 08:36:05 +02:00
xzfc
505ae14f4b
Codegen fix for procs taking type(nil) ( #9231 )
2018-10-09 14:51:34 +02:00
LemonBoy
a1083d7c43
Fix codegen for some set operations
...
Taking the LHS type when a temporary result value was needed lead to bad
code being generated if we get a tyRef.
Fixes #9098
2018-09-28 09:59:45 +02:00
Andreas Rumpf
179791aa9a
Merge pull request #8746 from LemonBoy/nil-opts
...
nil strings are movable
2018-09-23 07:51:22 +02:00
LemonBoy
7a087ffb29
nil strings are movable
2018-09-22 20:47:49 +02:00
Andreas Rumpf
c661f8e1be
Merge pull request #8983 from cooldome/codegen_crash
...
Fixes 8979
2018-09-18 09:36:16 +02:00
Andrii Riabushenko
acaf2b8e76
Fixes 8979
2018-09-16 21:33:21 +01:00
LemonBoy
6af6ca6351
Fix codegen for set[T] parameters
...
Sometimes sets are materialized as arrays and we must treat them as
such: the CPP backend is pickier than the C one and would sometimes
produce invalid code.
Fixes #8967
2018-09-15 11:55:11 +02:00
LemonBoy
839953c3e1
Fix hashing for codegenProc (sic) types
...
Since the name mangling is inhibited we should take the user-supplied
name during the sighash computation.
Fixes #8964
2018-09-14 15:37:51 +02:00
LemonBoy
8670f4911b
Fix semantic pass with borrowed magic procs ( #8945 )
...
Reported by pqflx3 on the forum.
2018-09-11 20:32:25 +02:00
LemonBoy
e7d4043406
Always emit hti object types if needed ( #8940 )
...
The compiler is now smart enough to emit types only if needed without
all the importc tricks. This also fixes a codegen bug where, if all the
stars align correctly, typeinfo doesn't include any definition of
`TNimType` but uses it.
Found by @skilchen in #8938
2018-09-11 17:03:21 +02:00
LemonBoy
e81fe6d32f
Allow wCodegenDecl on lambdas ( #8892 )
2018-09-07 01:58:49 +02:00
LemonBoy
4aba2981dd
Codegen fix for function pointers marked inline ( #8866 )
...
Fixes #5345
Fixes #5701
2018-09-04 15:28:14 +02:00
Vindaar
52f03fabc1
fixes #8781 by appending "_U" instead of 'U' ( #8787 )
2018-08-27 08:35:07 +02:00
Araq
27f488e5d9
make more tests green; system.repr does not produce 'nil' for strings and seqs anymore
2018-08-22 15:37:57 +02:00
LemonBoy
c04404635b
Fix unsound transform pass ( #8633 )
...
When a `var openArray[T]` function parameter goes trough the
`transformAddrDeref` pass we may lose the `var` specifier, leading to
nasty crashes at runtime.
2018-08-14 20:38:04 +02:00