File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ pub export fn entry4() void {
41
41
_ = U .foo (.{ .foo = 2 , .bar = 2 });
42
42
}
43
43
pub export fn entry5 () void {
44
- comptime var y = .{ 1 , 2 };
44
+ comptime var y = .{ 1 , 2 };
45
45
y = .{ 3 , 4 };
46
46
}
47
47
// pub export fn entry5() void {
@@ -52,7 +52,15 @@ pub export fn entry5() void {
52
52
// };
53
53
// _ = S.foo(.{ -1234, 5679, x });
54
54
// }
55
-
55
+ pub export fn entry6 () void {
56
+ const State = struct {
57
+ comptime id : bool = true ,
58
+ fn init (comptime id : bool ) @This () {
59
+ return @This (){ .id = id };
60
+ }
61
+ };
62
+ _ = State .init (false );
63
+ }
56
64
57
65
// error
58
66
// target=native
@@ -65,3 +73,4 @@ pub export fn entry5() void {
65
73
// :25:29: note: default value set here
66
74
// :41:16: error: value stored in comptime field does not match the default value of the field
67
75
// :45:12: error: value stored in comptime field does not match the default value of the field
76
+ // :59:35: error: value stored in comptime field does not match the default value of the field
You can’t perform that action at this time.
0 commit comments