aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-07-11 15:58:48 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-07-11 16:00:06 -0400
commit9bdcd2a495d4189d6536d43f1294dffb38daa9a5 (patch)
tree95072bfc6959b2b7efd26381492934855b8c0fbf /test
parent5954c94d2079c9b378ae14bb4c9c24aed719beec (diff)
downloadzig-9bdcd2a495d4189d6536d43f1294dffb38daa9a5.tar.gz
zig-9bdcd2a495d4189d6536d43f1294dffb38daa9a5.zip
add std.event.Future
This is like a promise, but it's for multiple getters, and uses an event loop.
Diffstat (limited to 'test')
-rw-r--r--test/stage2/compile_errors.zig12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/stage2/compile_errors.zig b/test/stage2/compile_errors.zig
new file mode 100644
index 0000000000..1dca908e69
--- /dev/null
+++ b/test/stage2/compile_errors.zig
@@ -0,0 +1,12 @@
+const TestContext = @import("../../src-self-hosted/test.zig").TestContext;
+
+pub fn addCases(ctx: *TestContext) !void {
+ try ctx.testCompileError(
+ \\export fn entry() void {}
+ \\export fn entry() void {}
+ , "1.zig", 2, 8, "exported symbol collision: 'entry'");
+
+ try ctx.testCompileError(
+ \\fn() void {}
+ , "1.zig", 1, 1, "missing function name");
+}