aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
AgeCommit message (Collapse)Author
2020-04-24stage1: Prevent the creation of illegal ptr typesLemonBoy
Closes #5140
2020-04-23stage1: fix crash on accessing an array of size zero with runtime indexxackus
2020-04-18update std lib to decls being disallowed between fieldsVexu
2020-04-18disallow declarations between container fieldsVexu
2020-04-18fix typeInfo testsVexu
2020-04-17add error for non-exter variadic functionsVexu
2020-04-17fix missing compile errors on builtin cast functionsVexu
2020-04-14Shift error message now says "fixed-width integer type" instead of just ↵foobles
"integer type" (#5028) * error message of ir_analyze_bit_shift now more accurate/specific * fixed compile error test to match bit shift error message
2020-04-09add error message for invalid assignmentVexu
2020-04-08move array and struct const checks to more appropriate placesVexu
2020-04-08fix missing compile error on assign to slice and array parametersVexu
2020-04-07fix broken testsVexu
2020-04-07fix missing const on address of literalVexu
2020-04-03add compiler-error test: coerceMichael Dusan
Issue fixed by an unknown commit. closes #4207
2020-04-03stage1: add compile errors for sentinel slicingMichael Dusan
closes #3963
2020-04-01add compile-error test: bitcastMichael Dusan
Issue fixed by an unknown commit. closes #3818
2020-04-01ir: Fix comparison of ?T valuesLemonBoy
The code assumed that every ?T had a pointer child type T, add some more checks to make sure the type is effectively a pointer. Closes #4789
2020-04-01Fix some nullptr dereferences on arm-linux-musleabhifTimon Kruiper
2020-03-31add compile-error test for #2687Michael Dusan
Issue fixed by an unknown commit. closes #2687
2020-03-26update compile error testsAndrew Kelley
2020-03-23Merge pull request #4741 from momumi/masterAndrew Kelley
allow `_` separators in number literals (stage 1)
2020-03-21ir: Disallow comparison between enum literal and untagged enumLemonBoy
Closes #4770
2020-03-21Address review commentsLemonBoy
2020-03-19fix compile error for reading past end of pointer casted arrayAndrew Kelley
2020-03-19test & docs fixups to work with new semanticsAndrew Kelley
2020-03-15add more test cases for invalid number literalsmomumi
2020-03-15make parsing `0.0_e1` an errormomumi
2020-03-15allow `_` separators in number literals (stage 1)momumi
* Underscores `_` may be placed between two digits in a int/float literal * Consecutive underscores are not allowed * Fixed parsing bug in exponents of hexadecimal float literals. Exponents should always be base 10, but hex characters would be parsed inside the exponent and everything after them would be ignored. eg: `0x1.0p1ab1` would be parsed as `0x1.0p1`.
2020-03-12Merge pull request #4707 from Vexu/small-atomicsAndrew Kelley
Support atomic operations with bools and non power of two integers
2020-03-12support `@atomicRmw` at comptimeVexu
2020-03-10use atomic bools in std libVexu
2020-03-10ir: Implement more safety checks for shl/shrLemonBoy
The checks are now valid on types whose size is not a power of two. Closes #2096
2020-03-09Merge pull request #4590 from xackus/fix-4587Andrew Kelley
fix failed assert on generic fn opaque return type
2020-03-09better error messages and more testsxackus
2020-03-09add LemonBoy's testVexu
2020-03-09implement noasync scopesVexu
2020-03-08ir: Create usize result_loc for array subscript exprLemonBoy
Allow the subscript expression to infer the resulting type. Closes #4169
2020-03-08ir: Prevent crash in compiler errorLemonBoy
Anonymous containers have no struct_field->type AstNode set, let's always use the field node itself to make the error messages consistent. Closes #4691
2020-03-08fix failed assert on generic fn opaque return typexackus
2020-03-08Fix grammar in error messagedaurnimator
2020-03-04ir: Implement @TypeOf with multiple argumentsLemonBoy
Closes #439
2020-02-28separate std.Target and std.zig.CrossTargetAndrew Kelley
Zig now supports a more fine-grained sense of what is native and what is not. Some examples: This is now allowed: -target native Different OS but native CPU, default Windows C ABI: -target native-windows This could be useful for example when running in Wine. Different CPU but native OS, native C ABI. -target x86_64-native -mcpu=skylake Different C ABI but otherwise native target: -target native-native-musl -target native-native-gnu Lots of breaking changes to related std lib APIs. Calls to getOs() will need to be changed to getOsTag(). Calls to getArch() will need to be changed to getCpuArch(). Usage of Target.Cross and Target.Native need to be updated to use CrossTarget API. `std.build.Builder.standardTargetOptions` is changed to accept its parameters as a struct with default values. It now has the ability to specify a whitelist of targets allowed, as well as the default target. Rather than two different ways of collecting the target, it's now always a string that is validated, and prints helpful diagnostics for invalid targets. This feature should now be actually useful, and contributions welcome to further improve the user experience. `std.build.LibExeObjStep.setTheTarget` is removed. `std.build.LibExeObjStep.setTarget` is updated to take a CrossTarget parameter. `std.build.LibExeObjStep.setTargetGLibC` is removed. glibc versions are handled in the CrossTarget API and can be specified with the `-target` triple. `std.builtin.Version` gains a `format` method.
2020-02-28update std lib to new Target APIAndrew Kelley
2020-02-27ir: Robust checking for init expr typeLemonBoy
Closes #3979
2020-02-26ir: Allow empty inferred error setsLemonBoy
Closes #4564
2020-02-26fix `@tagName` on extern and non-exhaustive enumsVexu
2020-02-25ir: Various fixes for comptime ptr handlingLemonBoy
* Correctly fold ptrToInt on optional types * Generate null as ConstPtrSpecialNull in intToPtr * Correctly stop ptrToInt on ?*T where T is zero-sized Closes #4535
2020-02-25remove `@IntType` and `@ArgType` (mostly) from the compilerVexu
2020-02-24remove uses of `@ArgType` and `@IntType`Vexu
2020-02-24remove usages of `@typeId`, `@memberCount`, `@memberName` and `@memberType`Vexu