| ... | ... | @@ -1086,3 +1086,26 @@ test "inline call of function with a switch inside the return statement" { |
| 1086 | 1086 | }; |
| 1087 | 1087 | try expect(S.foo(1) == 1); |
| 1088 | 1088 | } |
| 1089 | |
| 1090 | test "namespace lookup ignores decl causing the lookup" { |
| 1091 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; |
| 1092 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 1093 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1094 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1095 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1096 | |
| 1097 | const S = struct { |
| 1098 | fn Mixin(comptime T: type) type { |
| 1099 | return struct { |
| 1100 | fn foo() void { |
| 1101 | const set = std.EnumSet(T.E).init(undefined); |
| 1102 | _ = set; |
| 1103 | } |
| 1104 | }; |
| 1105 | } |
| 1106 | |
| 1107 | const E = enum { a, b }; |
| 1108 | usingnamespace Mixin(@This()); |
| 1109 | }; |
| 1110 | _ = S.foo(); |
| 1111 | } |