Andrew Kelley
057b105fad
one more test passing
2019-06-20 18:03:55 -04:00
Andrew Kelley
3c541d7be3
fix peer result loc fn call with comptime condition
2019-06-19 23:52:51 -04:00
Andrew Kelley
6217b401f9
fix labeled break inside comptime if inside runtime if
2019-06-19 23:39:49 -04:00
Andrew Kelley
78eeb6e9ae
fix double getelementptr of runtime global
2019-06-19 22:29:39 -04:00
Andrew Kelley
04c25efe11
Merge remote-tracking branch 'origin/master' into copy-elision-3
2019-06-19 19:01:28 -04:00
Andrew Kelley
4ffab5b85f
fix optional pointer to size zero struct
2019-06-19 18:47:02 -04:00
Andrew Kelley
c7dc03fcb1
fix try
not setting error code on result location
2019-06-19 17:07:05 -04:00
Andrew Kelley
96931228af
fix comptime test error for empty error set
2019-06-19 16:29:46 -04:00
Andrew Kelley
974db231a0
fix extraneous nested union field instruction
2019-06-19 16:16:47 -04:00
Andrew Kelley
e36680d3bd
fix detection of unable to evaluate constant expression
2019-06-19 15:18:51 -04:00
Andrew Kelley
b588a803bf
fix comptime modification of const struct field
2019-06-19 14:35:59 -04:00
Andrew Kelley
79671efd3a
fix inline loop behavior with variable result loc
2019-06-18 17:43:05 -04:00
Andrew Kelley
e27da17ff2
back to many behavioral tests passing
2019-06-18 17:07:27 -04:00
Andrew Kelley
9050a07540
when resolving slice types, might need to...
...
...resolve alignment if custom alignment is provided
fixes #2689
2019-06-18 11:31:05 -04:00
Andrew Kelley
8ed88280a6
Revert "fixes resolving aligment of child type in slice"
...
This reverts commit aa60d2a688
.
The copyright ownership of this 10 line patch is under dispute.
See #2701 for details. So I'll revert it and then fix it myself without
looking at this patch.
2019-06-18 11:18:53 -04:00
Andrew Kelley
f4b8850002
fix type info crash on extern lib name
2019-06-16 14:14:57 -04:00
Jimmi HC
aa60d2a688
fixes resolving aligment of child type in slice
2019-06-16 00:03:43 -04:00
Andrew Kelley
9564c05cd5
better result location handling of inline loops
2019-06-15 19:19:13 -04:00
Andrew Kelley
6bf193af19
better result location semantics with optionals and return locations
...
somewhere along this branch, #1901 has been fixed.
2019-06-15 12:28:21 -04:00
Andrew Kelley
60025a3704
Merge remote-tracking branch 'origin/master' into copy-elision-3
2019-06-15 10:34:04 -04:00
Andrew Kelley
42ea2d0d1c
fix @export
for arrays and allow sections on extern variables
...
previously `@export` for an array would panic with a TODO message.
now it will do the export. However, it uses the variable's name
rather than the name passed to `@export`. Issue #2679 remains open
for that problem.
2019-06-14 15:28:52 -04:00
Andrew Kelley
acf16b5fb3
uncomment more passing tests
2019-06-14 13:32:04 -04:00
Andrew Kelley
7c074b8516
fix peer result locs with switch
2019-06-14 11:41:53 -04:00
Andrew Kelley
2ba29a1907
fix peer result location with error code and payload
2019-06-14 11:01:38 -04:00
Andrew Kelley
fdaca1b5f3
fix a couple more test regressions
2019-06-13 20:30:39 -04:00
Andrew Kelley
eaf74f4f96
fix bitcast packed struct to integer and back
2019-06-13 20:24:10 -04:00
Andrew Kelley
57347aacd7
fix atomic builtin functions
2019-06-13 20:01:25 -04:00
Andrew Kelley
24cfa3534f
allow comptime array literals casted to slices
2019-06-13 16:51:26 -04:00
Andrew Kelley
3cbe827464
fix behavior for nested array literals
...
new compile error for trying to cast runtime array literals to slices
2019-06-13 16:25:35 -04:00
Andrew Kelley
efb064449f
fix runtime initialize array elem and then implicit cast to slice
2019-06-13 13:31:15 -04:00
Andrew Kelley
ca0988e1d0
comment out the behavior tests that are failing
2019-06-12 22:19:56 -04:00
SamTebbs33
6c160b8856
Add check for null body in if, for and while
2019-06-10 00:41:33 -04:00
Andrew Kelley
b735764898
different array literal syntax when inferring the size
...
old syntax: []i32{1, 2, 3}
new syntax: [_]i32{1, 2, 3}
closes #1797
2019-06-09 19:26:32 -04:00
Andrew Kelley
78f32259da
default struct field initialization expressions
...
closes #485
2019-05-30 15:46:11 -04:00
Andrew Kelley
8ca294c430
update load dynamic library test for std lib changes
2019-05-30 00:04:11 -04:00
tgschultz
f9e7bd2682
std.meta/trait: def/definition => decl/declaration
...
TypeInfo: defs/Definition => decls/Declarations
2019-05-29 20:43:07 -04:00
NBonaparte
e716c9ba4b
build_examples: reenable load_dynamic_library
2019-05-29 19:48:36 -04:00
Andrew Kelley
bfc86776d5
run zig fmt to update use
to usingnamespace
2019-05-29 19:09:58 -04:00
Andrew Kelley
1ccbd1fb67
use
works on unions and enums in addition to structs
2019-05-29 16:31:49 -04:00
Andrew Kelley
9891c4f30d
Merge branch 'use-struct-pt2' of https://github.com/LemonBoy/zig into LemonBoy-use-struct-pt2
2019-05-29 15:48:49 -04:00
Andrew Kelley
b66438eb80
no "use of undeclared identifer" in dead comptime branches
2019-05-28 18:19:27 -04:00
LemonBoy
528c151a55
Reject undefined as type
...
Make analyze_type_expr behave like ir_resolve_type when the user tries
to use `undefined` as a type.
Closes #2436
2019-05-28 18:02:57 -04:00
Andrew Kelley
9d16839420
fix invalid LLVM IR generated for ?*void const casts
...
closes #2578
2019-05-28 16:11:36 -04:00
Andrew Kelley
f924fbddcf
Merge pull request #2552 from Sahnvour/issue-2543
...
gen-h: do not output visibility macros when the build is static
2019-05-27 21:51:34 -04:00
Andrew Kelley
0c6ab61b22
tests passing on linux
2019-05-26 23:35:26 -04:00
Andrew Kelley
2b42e910bf
behavior tests passing on Linux
2019-05-26 19:56:37 -04:00
Andrew Kelley
44a049e01e
more cleanup. down to just the @hasDecl
builtin
2019-05-26 18:32:45 -04:00
Andrew Kelley
2f040a23c8
clean up references to os
2019-05-26 18:32:44 -04:00
Andrew Kelley
df7aa9a4f0
allow implicit optional pointer to optional c_void pointer
2019-05-26 17:55:20 -04:00
Andrew Kelley
269a53b6af
introduce @hasDecl builtin function
...
closes #1439
2019-05-26 16:21:03 -04:00