From 42ea2d0d1c3b8cafdfc9a383cbb1bab274eb0140 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 14 Jun 2019 15:20:52 -0400 Subject: fix `@export` for arrays and allow sections on extern variables previously `@export` for an array would panic with a TODO message. now it will do the export. However, it uses the variable's name rather than the name passed to `@export`. Issue #2679 remains open for that problem. --- test/compile_errors.zig | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'test/compile_errors.zig') diff --git a/test/compile_errors.zig b/test/compile_errors.zig index 7896a0b732..e85b2f3395 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -4645,16 +4645,6 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { "tmp.zig:1:1: note: declared here", ); - cases.add( - "setting a section on an extern variable", - \\extern var foo: i32 linksection(".text2"); - \\export fn entry() i32 { - \\ return foo; - \\} - , - "tmp.zig:1:33: error: cannot set section of external variable 'foo'", - ); - cases.add( "setting a section on a local variable", \\export fn entry() i32 { @@ -4665,16 +4655,6 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { "tmp.zig:2:30: error: cannot set section of local variable 'foo'", ); - cases.add( - "setting a section on an extern fn", - \\extern fn foo() linksection(".text2") void; - \\export fn entry() void { - \\ foo(); - \\} - , - "tmp.zig:1:29: error: cannot set section of external function 'foo'", - ); - cases.add( "returning address of local variable - simple", \\export fn foo() *i32 { -- cgit v1.2.3