aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2021-02-22 17:38:09 +0100
committerIsaac Freund <ifreund@ifreund.xyz>2021-02-22 17:38:09 +0100
commitce9b3ee0f908a776b67a5d7bedc2075559e7643c (patch)
tree143e51a3833b5a97af4ec62d4f950f6be1d398d0 /lib/std
parent34c08a91d59a521f81ec5d4d4ee58a73038c286f (diff)
downloadzig-ce9b3ee0f908a776b67a5d7bedc2075559e7643c.tar.gz
zig-ce9b3ee0f908a776b67a5d7bedc2075559e7643c.zip
parser: anytype is not a vaild return type
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/zig/parser_test.zig28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/std/zig/parser_test.zig b/lib/std/zig/parser_test.zig
index 3008744023..aaf2331a9c 100644
--- a/lib/std/zig/parser_test.zig
+++ b/lib/std/zig/parser_test.zig
@@ -2414,14 +2414,14 @@ test "zig fmt: preserve spacing" {
);
}
-//test "zig fmt: return types" {
-// try testCanonical(
-// \\pub fn main() !void {}
-// \\pub fn main() anytype {}
-// \\pub fn main() i32 {}
-// \\
-// );
-//}
+test "zig fmt: return types" {
+ try testCanonical(
+ \\pub fn main() !void {}
+ \\pub fn main() FooBar {}
+ \\pub fn main() i32 {}
+ \\
+ );
+}
test "zig fmt: imports" {
try testCanonical(
@@ -2652,12 +2652,12 @@ test "zig fmt: call expression" {
);
}
-//test "zig fmt: anytype type" {
-// try testCanonical(
-// \\fn print(args: anytype) anytype {}
-// \\
-// );
-//}
+test "zig fmt: anytype type" {
+ try testCanonical(
+ \\fn print(args: anytype) @This() {}
+ \\
+ );
+}
test "zig fmt: functions" {
try testCanonical(