parser: port test "rewrite callconv(.@\"inline\") to the inline keyword"
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -568,6 +568,20 @@ test "zig fmt: tuple struct" {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test "zig fmt: rewrite callconv(.@\"inline\") to the inline keyword" {
|
||||||
|
try testTransform(
|
||||||
|
\\fn foo() callconv(.@"inline") void {}
|
||||||
|
\\const bar: @import("std").builtin.CallingConvention = .@"inline";
|
||||||
|
\\fn foo() callconv(bar) void {}
|
||||||
|
\\
|
||||||
|
,
|
||||||
|
\\inline fn foo() void {}
|
||||||
|
\\const bar: @import("std").builtin.CallingConvention = .@"inline";
|
||||||
|
\\fn foo() callconv(bar) void {}
|
||||||
|
\\
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
test "zig fmt: respect line breaks in struct field value declaration" {
|
test "zig fmt: respect line breaks in struct field value declaration" {
|
||||||
try testCanonical(
|
try testCanonical(
|
||||||
\\const Foo = struct {
|
\\const Foo = struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user