aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-06-07 17:26:41 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-06-07 18:07:30 -0400
commit31aefa6a2179dfae752020195fb193c6333bae7e (patch)
tree3bf77a35c39424e736da020a0451d6fe32d7648b /test/compile_errors.zig
parentb11c5d8f8256fc19e08eacfc50be209878f00e73 (diff)
downloadzig-31aefa6a2179dfae752020195fb193c6333bae7e.tar.gz
zig-31aefa6a2179dfae752020195fb193c6333bae7e.zip
fix structs that contain types which require comptime
Now, if a struct has any fields which require comptime, such as `type`, then the struct is marked as requiring comptime as well. Same goes for unions. This means that a function will implicitly be called at comptime if the return type is a struct which contains a field of type `type`. closes #586
Diffstat (limited to 'test/compile_errors.zig')
-rw-r--r--test/compile_errors.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig
index c995cd679e..102c4e428d 100644
--- a/test/compile_errors.zig
+++ b/test/compile_errors.zig
@@ -3329,7 +3329,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
".tmp_source.zig:9:4: error: variable of type 'comptime_float' must be const or comptime",
".tmp_source.zig:10:4: error: variable of type '(block)' must be const or comptime",
".tmp_source.zig:11:4: error: variable of type '(null)' must be const or comptime",
- ".tmp_source.zig:12:4: error: variable of type 'Opaque' must be const or comptime",
+ ".tmp_source.zig:12:4: error: variable of type 'Opaque' not allowed",
".tmp_source.zig:13:4: error: variable of type 'type' must be const or comptime",
".tmp_source.zig:14:4: error: variable of type '(namespace)' must be const or comptime",
".tmp_source.zig:15:4: error: variable of type '(bound fn(*const Foo) void)' must be const or comptime",