From 2911eb34ded4709429a9767e08675ae862907a5f Mon Sep 17 00:00:00 2001 From: Jimmi Holst Christensen Date: Wed, 13 Feb 2019 12:19:08 +0100 Subject: [PATCH] Added error for nesting vectors --- test/compile_errors.zig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/compile_errors.zig b/test/compile_errors.zig index b47cdf2ed1..b895e2c2d1 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -5430,4 +5430,14 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { , ".tmp_source.zig:7:30: error: unable to evaluate constant expression", ); + + cases.addTest( + "nested vectors", + \\export fn entry() void { + \\ const V = @Vector(4, @Vector(4, u8)); + \\ var v: V = undefined; + \\} + , + ".tmp_source.zig:2:26: error: vector element type must be integer, float, or pointer; '@Vector(4, u8)' is invalid", + ); }