aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
AgeCommit message (Collapse)Author
2018-06-30Fixed line numbers for testsJimmi Holst Christensen
2018-06-30Expanded the list of operators that catch undefined values at comptimeJimmi Holst Christensen
2018-06-30Revert "ir_resolve_const now checks recursivly for undef values"Jimmi Holst Christensen
This reverts commit 4c3f27ce1ea17b5236a022971ebace73a02b7c2b.
2018-06-29Clarify reason implicit cast does not work for large RHS (#1168)isaachier
* Clarify reason implicit cast does not work for large RHS
2018-06-29ir_resolve_const now checks recursivly for undef valuesJimmi HC
2018-06-21fix compiler crash for invalid enumAndrew Kelley
closes #1079 closes #1147
2018-06-19remove redundant implicit casting codeAndrew Kelley
and introduce better type mismatch errors closes #1061
2018-06-19`@floatToInt` now has safety-checked undefined behaviorAndrew Kelley
when the integer part does not fit in the destination integer type * Also fix incorrect safety triggered for integer casting an `i32` to a `u7`. closes #1138 * adds compiler-rt function: `__floatuntidf`
2018-06-19remove enum to/from int casting syntax; add `@enumToInt`/`@intToEnum`Andrew Kelley
see #1061
2018-06-18remove error to/from int casting syntax; add `@errorToInt`/`@intToError`Andrew Kelley
See #1061
2018-06-18remove []u8 casting syntax. add `@bytesToSlice` and `@sliceToBytes`Andrew Kelley
See #1061
2018-06-18disallow opaque as a return type of fn type syntaxAndrew Kelley
closes #1115
2018-06-18fix compiler crash when using @intToFloat with float literalAndrew Kelley
closes #1132
2018-06-17update test casesAndrew Kelley
2018-06-16don't automatically take pointer when passing by non-copying valueAndrew Kelley
this commit does not have all tests passing
2018-06-16allow passing by non-copying valueAndrew Kelley
closes #733
2018-06-13disallow implicit casts that break rules for optionalsAndrew Kelley
closes #1102
2018-06-10breaking syntax change: orelse keyword instead of ?? (#1096)Andrew Kelley
use the `zig-fmt-optional-default` branch to have zig fmt automatically do the changes. closes #1023
2018-06-09breaking syntax change: ??x to x.? (#1095)Andrew Kelley
See #1023 This also renames Nullable/Maybe to Optional
2018-06-07fix structs that contain types which require comptimeAndrew Kelley
Now, if a struct has any fields which require comptime, such as `type`, then the struct is marked as requiring comptime as well. Same goes for unions. This means that a function will implicitly be called at comptime if the return type is a struct which contains a field of type `type`. closes #586
2018-06-05add test for not allowing implicit cast from T to [*]const TAndrew Kelley
See #770
2018-06-05disable deref syntax for unknown length pointersAndrew Kelley
See #770
2018-06-05disable field access for unknown length pointersAndrew Kelley
See #770
2018-06-05disallow unknown-length pointer to opaqueAndrew Kelley
This also means that translate-c has to detect when a pointer to opaque is happening, and use `*` instead of `[*]`. See #1059
2018-06-05fix crash when evaluating return type has compile errorAndrew Kelley
closes #1058
2018-06-05Renamed "(int/float literal)" to "comptime_int/float"Jimmi HC
2018-06-04Pointer Reform: proper slicing and indexing (#1053)Andrew Kelley
* enable slicing for single-item ptr to arrays * disable slicing for other single-item pointers * enable indexing for single-item ptr to arrays * disable indexing for other single-item pointers see #770 closes #386
2018-06-04disallow single-item pointer indexingAndrew Kelley
add pointer arithmetic for unknown length pointer
2018-06-02better compile error for error sets behind nullableAndrew Kelley
2018-06-01fix regressionsAndrew Kelley
2018-05-31use * for pointer type instead of &Andrew Kelley
See #770 To help automatically translate code, see the zig-fmt-pointer-reform-2 branch. This will convert all & into *. Due to the syntax ambiguity (which is why we are making this change), even address-of & will turn into *, so you'll have to manually fix thes instances. You will be guaranteed to get compile errors for them - expected 'type', found 'foo'
2018-05-29run zig fmt on the codebaseAndrew Kelley
See #1003
2018-05-17all tests passing with postfix deref syntaxAndrew Kelley
2018-05-01Resolved merge conflict.Alexandros Naskos
2018-05-01Added tests.Alexandros Naskos
2018-04-28.ReturnType and @ArgType now emits errors on unresolved typesJimmi Holst Christensen
related: #846
2018-04-22add compile error for invalid deref on switch targetAndrew Kelley
closes #945
2018-04-21add test case for #936Andrew Kelley
2018-04-18support break in suspend blocksAndrew Kelley
* you can label suspend blocks * labeled break supports suspend blocks See #803
2018-04-18improve cmpxchgAndrew Kelley
* remove @cmpxchg, add @cmpxchgWeak and @cmpxchgStrong - See explanations in the langref. * add operand type as first parameter * return type is ?T where T is the operand type closes #461
2018-04-12inline functions must be stored in const or comptime varAndrew Kelley
closes #913
2018-04-11allow integer and float literals to be passed to var paramsAndrew Kelley
closes #623
2018-03-27fix crash when compile error in analyzing @panic callAndrew Kelley
2018-03-21change async function call syntaxAndrew Kelley
* instead of `async(allocator) call()`, now it is `async<allocator> call()`. * Fixes syntax ambiguity when leaving off the allocator * Fixes parse failure when call is a field access This sets a precedent for using `<` to pass arguments to a keyword. This will affect `enum`, `union`, and `fn` (see #661)
2018-03-14fix tests broken by previous commitAndrew Kelley
2018-03-13Tests for zero-bit field compiler errorAndrea Orru
2018-03-07add compile error for using @tagName on extern unionAndrew Kelley
closes #742
2018-03-06fix missing compile error for returning error from void async functionAndrew Kelley
closes #799
2018-03-06var is no longer a pseudo-type, it is syntaxAndrew Kelley
closes #779
2018-03-06fix broken tests from previous commitAndrew Kelley