@@ -106,10 +106,9 @@ fn addOptionFallible(self: *Options, comptime T: type, name: []const u8, value:
106
106
try out .print (" {},\n " , .{std .zig .fmtId (field .name )});
107
107
}
108
108
try out .writeAll ("};\n " );
109
- try out .print ("pub const {}: {s} = {s} .{s};\n " , .{
109
+ try out .print ("pub const {}: {s} = .{s};\n " , .{
110
110
std .zig .fmtId (name ),
111
111
std .zig .fmtId (@typeName (T )),
112
- std .zig .fmtId (@typeName (T )),
113
112
std .zig .fmtId (@tagName (value )),
114
113
});
115
114
return ;
@@ -322,10 +321,9 @@ test Options {
322
321
323
322
const options = builder .addOptions ();
324
323
325
- // TODO this regressed at some point
326
- //const KeywordEnum = enum {
327
- // @"0.8.1",
328
- //};
324
+ const KeywordEnum = enum {
325
+ @"0.8.1" ,
326
+ };
329
327
330
328
const nested_array = [2 ][2 ]u16 {
331
329
[2 ]u16 { 300 , 200 },
@@ -341,7 +339,7 @@ test Options {
341
339
options .addOption (? []const u8 , "optional_string" , null );
342
340
options .addOption ([2 ][2 ]u16 , "nested_array" , nested_array );
343
341
options .addOption ([]const []const u16 , "nested_slice" , nested_slice );
344
- // options.addOption(KeywordEnum, "keyword_enum", .@"0.8.1");
342
+ options .addOption (KeywordEnum , "keyword_enum" , .@"0.8.1" );
345
343
options .addOption (std .SemanticVersion , "semantic_version" , try std .SemanticVersion .parse ("0.1.2-foo+bar" ));
346
344
347
345
try std .testing .expectEqualStrings (
@@ -371,10 +369,10 @@ test Options {
371
369
\\ 200,
372
370
\\ },
373
371
\\};
374
- // \\pub const KeywordEnum = enum {
375
- // \\ @"0.8.1",
376
- // \\};
377
- // \\pub const keyword_enum: KeywordEnum = KeywordEnum .@"0.8.1";
372
+ \\pub const @"Build.Step.Options.decltest.Options. KeywordEnum" = enum {
373
+ \\ @"0.8.1",
374
+ \\};
375
+ \\pub const keyword_enum: @"Build.Step.Options.decltest.Options. KeywordEnum" = .@"0.8.1";
378
376
\\pub const semantic_version: @import("std").SemanticVersion = .{
379
377
\\ .major = 0,
380
378
\\ .minor = 1,
0 commit comments