Merge pull request #13585 from Vexu/stage2-fixes

Stage2 bug fixes
This commit is contained in:
Veikka Tuominen
2022-11-21 13:48:23 +02:00
committed by Andrew Kelley
parent 10a660ebea
commit a3232c6764
20 changed files with 454 additions and 89 deletions

View File

@@ -1118,3 +1118,12 @@ test "ambiguous reference error ignores current declaration" {
};
try expect(S.b.foo == 666);
}
test "pointer to zero sized global is mutable" {
const S = struct {
const Thing = struct {};
var thing: Thing = undefined;
};
try expect(@TypeOf(&S.thing) == *S.Thing);
}