From 8915883cf627c12a7e6da9bb813d456407ebb091 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 24 Dec 2015 13:25:54 -0700 Subject: add error for byvalue struct param on exported fn --- test/run_tests.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/run_tests.cpp') diff --git a/test/run_tests.cpp b/test/run_tests.cpp index e2642d5128..f5f814de8b 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -872,6 +872,11 @@ fn f() { struct A { x : i32, } struct A { y : i32, } )SOURCE", 1, ".tmp_source.zig:3:1: error: redefinition of 'A'"); + + add_compile_fail_case("byvalue struct on exported functions", R"SOURCE( +struct A { x : i32, } +export fn f(a : A) {} + )SOURCE", 1, ".tmp_source.zig:3:13: error: byvalue struct parameters not yet supported on exported functions"); } static void print_compiler_invocation(TestCase *test_case) { -- cgit v1.2.3