aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
AgeCommit message (Collapse)Author
2017-10-15fix windows argument parsingAndrew Kelley
2017-10-06fix compiler crash when invalid value usedAndrew Kelley
closes #527
2017-10-03add @setAlignStack builtinAndrew Kelley
2017-09-28Allow 128-bit hex float literalsMarc Tiehuis
Closes #499.
2017-09-17add test for struct with invalid fieldAndrew Kelley
see #468
2017-09-10fix not verifying GlobalLinkage and AtomicOrder typesAndrew Kelley
thanks to aep4Ayai on IRC
2017-09-09more compile errors for non-const variables of thingsAndrew Kelley
closes #456
2017-09-05add OpaqueType builtinAndrew Kelley
closes #326
2017-08-31setEvalBranchQuota must be called from top of comptime stackAndrew Kelley
2017-08-31allow array literals to have size and fix comptime bugAndrew Kelley
2017-08-30align syntax: align(4) instead of align 4Andrew Kelley
closes #37
2017-08-30compile error for not-aligned-enough pointer to cmpxchgAndrew Kelley
See #37
2017-08-30add tests for function alignment handlingAndrew Kelley
See #37
2017-08-29more alignment improvementsAndrew Kelley
* add alignment capability for fn protos * add @alignCast * fix some ast rendering code * fix some ir rendering code * add error for pointer cast increasing alignment * update allocators in std to correctly align See #37
2017-08-29fix testsAndrew Kelley
2017-08-29ptrCast gives compile error for increasing alignmentAndrew Kelley
See #37
2017-08-29prevent implicitly increasing pointer alignmentAndrew Kelley
See #37
2017-08-29introduce align keywordAndrew Kelley
* remove `@setGlobalAlign` * add align keyword for setting alignment on functions and variables. * loads and stores use alignment from pointer * memcpy, memset use alignment from pointer * add syntax for pointer alignment * slices can have volatile * add u2, i2 primitives * ignore preferred align and use abi align everywhere * back to only having alignOf builtin. preferredAlignOf is too tricky to be useful. See #432. Partial revert of e726925e802eddab53cbfd9aacbc5eefe95c356f. See #37
2017-08-19add compile error for globally shadowing a primitive typeAndrew Kelley
closes #423
2017-08-19bit shifting safetyAndrew Kelley
* add u3, u4, u5, u6, u7 and i3, i4, i5, i6, i7 * shift operations shift amount parameter type is integer with log2 bit width of other param - This enforces not violating undefined behavior on shift amount >= bit width with the type system * clean up math.log, math.ln, math.log2, math.log10 closes #403
2017-08-09more intuitive left shift and right shift operatorsAndrew Kelley
Before: * << is left shift, not allowed to shift 1 bits out * <<% is left shift, allowed to shift 1 bits out * >> is right shift, allowed to shift 1 bits out After: * << is left shift, allowed to shift 1 bits out * >> is right shift, allowed to shift 1 bits out * @shlExact is left shift, not allowed to shift 1 bits out * @shrExact is right shift, not allowed to shift 1 bits out Closes #413
2017-08-08add ptrToInt builtin, remove usize(ptr) castAndrew Kelley
closes #415
2017-08-07add ability to explicitly cast float to integerAndrew Kelley
closes #414
2017-08-07Correct floating-point literal allowed rangesMarc Tiehuis
The exponent range for floating-point values is [-1022, 1023]. Fixes #399.
2017-08-05fix initializing undefined and crash when casting to invalid typeAndrew Kelley
closes #408
2017-06-14progress toward windows hello world workingAndrew Kelley
2017-06-03compileError builtin includes "referenced by" notesAndrew Kelley
to help track down the cause closes #278
2017-05-26fix segfault with array of generic functionsAndrew Kelley
closes #377
2017-05-25fix segfault with array of variadic functionsAndrew Kelley
closes #377
2017-05-21add compile error for goto leaving defer expressionAndrew Kelley
closes #284
2017-05-21add error for break/continue exiting defer expressionAndrew Kelley
See #284
2017-05-21fix compiler crash when indexing typesAndrew Kelley
closes #376
2017-05-20add setFloatMode builtin and std.math.floorAndrew Kelley
* skip installing std/rand_test.zig as it's not needed beyond running the std lib tests * add std.math.floor function * add setFloatMode builtin function to choose between builtin.FloatMode.Optimized (default) and builtin.FloatMode.Strict (Optimized is equivalent to -ffast-math in gcc)
2017-05-19change slicing syntax from ... to ..Andrew Kelley
See #359
2017-05-16add compile error for compile-time integer cast truncating bitsAndrew Kelley
closes #371
2017-05-14add compile error for comptime division by zeroAndrew Kelley
closes #372
2017-05-10add compile error for casting negative value to...Andrew Kelley
...unsigned integer at compile-time
2017-05-07detect duplicate switch value even when else prong presentAndrew Kelley
closes #43
2017-05-07switch expression - add compile errorsAndrew Kelley
* for duplicate integer value * for missing integer values * for missing else prong see #43
2017-05-06allow division and remainder operators sometimesAndrew Kelley
when the values are comptime known and the result would be the same, allow `/` and `%` for signed integers and floats. closes #365
2017-05-06builtin functions for division and remainder divisionAndrew Kelley
* add `@divTrunc` and `@divFloor` functions * add `@rem` and `@mod` functions * add compile error for `/` and `%` with signed integers * add `.bit_count` for float primitive types closes #217
2017-05-04add compile error when unable to inline a functionAndrew Kelley
See #38
2017-05-04implement while for nullables and error unionsAndrew Kelley
See #357
2017-05-03change while syntaxAndrew Kelley
Old: ``` while (condition; expression) {} ``` New: ``` while (condition) : (expression) {} ``` This is in preparation to allow nullable and error union types as the condition. See #357
2017-05-03remove test and try expressions in favor of if expressionsAndrew Kelley
See #357
2017-05-03add compile error for shadowing variableAndrew Kelley
closes #360
2017-05-03zig build: cache_root is relative to build_rootAndrew Kelley
2017-05-01`@import("builtin")` instead of `@compileVar`Andrew Kelley
See #226 Closes #220
2017-04-27phi instruction retains stack ptr hintAndrew Kelley
2017-04-27add compile error for returning local variable addressAndrew Kelley
closes #344