diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-02-02 15:58:13 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-02-02 15:58:13 -0700 |
| commit | 79adf55699a549841eba3eb07f1dbb19c4da9ed1 (patch) | |
| tree | bb6ddb73b7b31a53ee198a068719204fa285eb0f /test/run_tests.cpp | |
| parent | 7af59c76e40d185ed1a8962c2d5fd0f88680d5a7 (diff) | |
| download | zig-79adf55699a549841eba3eb07f1dbb19c4da9ed1.tar.gz zig-79adf55699a549841eba3eb07f1dbb19c4da9ed1.zip | |
fx segfault with colliding bogus top level functions
Diffstat (limited to 'test/run_tests.cpp')
| -rw-r--r-- | test/run_tests.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp index 7a58668d2d..39bbf504b8 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -1964,6 +1964,14 @@ export fn c(x: i32) -> i32 {x + 2} const x : f64 = 1.0; const y : f32 = x; )SOURCE", 1, ".tmp_source.zig:3:17: error: expected type 'f32', got 'f64'"); + + + add_compile_fail_case("colliding invalid top level functions", R"SOURCE( +fn func() -> bogus {} +fn func() -> bogus {} + )SOURCE", 2, + ".tmp_source.zig:3:1: error: redefinition of 'func'", + ".tmp_source.zig:2:14: error: use of undeclared identifier 'bogus'"); } ////////////////////////////////////////////////////////////////////////////// |
