aboutsummaryrefslogtreecommitdiff
path: root/test/incremental/function_redeclaration.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2022-04-27 15:37:54 +0200
committerJakub Konka <kubkon@jakubkonka.com>2022-04-28 18:35:01 +0200
commit97b781955eca7c3fc6ee2713f8b5e355645fff58 (patch)
tree36bef811176a694d1071b4957c622d42ffd97a52 /test/incremental/function_redeclaration.zig
parent133708d9396defc46630adc6acd24a493277b7d5 (diff)
downloadzig-97b781955eca7c3fc6ee2713f8b5e355645fff58.tar.gz
zig-97b781955eca7c3fc6ee2713f8b5e355645fff58.zip
test: fix incorrect default target spec; port all incremental tests
Diffstat (limited to 'test/incremental/function_redeclaration.zig')
-rw-r--r--test/incremental/function_redeclaration.zig14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/incremental/function_redeclaration.zig b/test/incremental/function_redeclaration.zig
new file mode 100644
index 0000000000..a9664646c9
--- /dev/null
+++ b/test/incremental/function_redeclaration.zig
@@ -0,0 +1,14 @@
+// dummy comment
+fn entry() void {}
+fn entry() void {}
+
+fn foo() void {
+ var foo = 1234;
+}
+
+// error
+//
+// :3:1: error: redeclaration of 'entry'
+// :2:1: note: other declaration here
+// :6:9: error: local shadows declaration of 'foo'
+// :5:1: note: declared here