Merge remote-tracking branch 'origin/master' into stage2-zig-cc

This commit is contained in:
Andrew Kelley
2020-09-29 14:53:48 -07:00
12 changed files with 692 additions and 46 deletions

View File

@@ -2,6 +2,14 @@ const tests = @import("tests.zig");
const std = @import("std");
pub fn addCases(cases: *tests.CompileErrorContext) void {
cases.add("slice sentinel mismatch",
\\export fn entry() void {
\\ const x = @import("std").meta.Vector(3, f32){ 25, 75, 5, 0 };
\\}
, &[_][]const u8{
"tmp.zig:2:62: error: index 3 outside vector of size 3",
});
cases.add("slice sentinel mismatch",
\\export fn entry() void {
\\ const y: [:1]const u8 = &[_:2]u8{ 1, 2 };
@@ -7548,7 +7556,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
});
cases.add( // fixed bug #2032
"compile diagnostic string for top level decl type",
"compile diagnostic string for top level decl type",
\\export fn entry() void {
\\ var foo: u32 = @This(){};
\\}