diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-07-24 14:06:44 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-07-24 14:06:44 -0700 |
| commit | 995fd7314cd230ca7c829bb478f88b1ab7efd7b4 (patch) | |
| tree | 44566c0e999e8977a69d69f06fbfea8e4cc3ffd6 /test/compile_errors.zig | |
| parent | 978a38ee40e13c3eed625f2df7b36be49fd049e0 (diff) | |
| download | zig-995fd7314cd230ca7c829bb478f88b1ab7efd7b4.tar.gz zig-995fd7314cd230ca7c829bb478f88b1ab7efd7b4.zip | |
Revert "Support taking extern pointers at comptime"
This reverts commit d3ebd428650748e60db70dd2171cc044855814b1.
This caused a build failure on multiple targets.
Diffstat (limited to 'test/compile_errors.zig')
| -rw-r--r-- | test/compile_errors.zig | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig index 1ccc95c9cc..a1a261f887 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -7637,26 +7637,4 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { , &[_][]const u8{ "tmp.zig:4:9: error: expected type '*c_void', found '?*c_void'", }); - - cases.add("pointer to a local runtime `var` is not constant", - \\export fn get_ptr() *const u32 { - \\ var local_var: u32 = 42; - \\ return struct { - \\ const ptr = &local_var; - \\ }.ptr; - \\} - , &[_][]const u8{ - ":4:21: error: cannot store runtime value in compile time variable", - }); - - cases.add("pointer to a local runtime `const` is not constant", - \\export fn get_ptr(x: u32) *const u32 { - \\ const local_var: u32 = x; - \\ return struct { - \\ const ptr = &local_var; - \\ }.ptr; - \\} - , &[_][]const u8{ - ":4:21: error: cannot store runtime value in compile time variable", - }); } |
