authorgravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2021-02-22 17:38:09+01:00
committergravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2021-02-22 17:38:09+01:00
logce9b3ee0f908a776b67a5d7bedc2075559e7643c
tree143e51a3833b5a97af4ec62d4f950f6be1d398d0
parent34c08a91d59a521f81ec5d4d4ee58a73038c286f
signaturelock-open Commit is signed but in an unrecognized format.

parser: anytype is not a vaild return type


1 files changed, 14 insertions(+), 14 deletions(-)

lib/std/zig/parser_test.zig+14-14
......@@ -2414,14 +2414,14 @@ test "zig fmt: preserve spacing" {
24142414 );
24152415}
24162416
2417//test "zig fmt: return types" {
2418// try testCanonical(
2419// \\pub fn main() !void {}
2420// \\pub fn main() anytype {}
2421// \\pub fn main() i32 {}
2422// \\
2423// );
2424//}
2417test "zig fmt: return types" {
2418 try testCanonical(
2419 \\pub fn main() !void {}
2420 \\pub fn main() FooBar {}
2421 \\pub fn main() i32 {}
2422 \\
2423 );
2424}
24252425
24262426test "zig fmt: imports" {
24272427 try testCanonical(
......@@ -2652,12 +2652,12 @@ test "zig fmt: call expression" {
26522652 );
26532653}
26542654
2655//test "zig fmt: anytype type" {
2656// try testCanonical(
2657// \\fn print(args: anytype) anytype {}
2658// \\
2659// );
2660//}
2655test "zig fmt: anytype type" {
2656 try testCanonical(
2657 \\fn print(args: anytype) @This() {}
2658 \\
2659 );
2660}
26612661
26622662test "zig fmt: functions" {
26632663 try testCanonical(