zig/test/behavior/bugs/679.zig
Andrew Kelley 4307436b99 move behavior tests from test/stage1/ to test/
And fix test cases to make them pass. This is in preparation for
starting to pass behavior tests with self-hosted.
2021-04-29 15:54:04 -07:00

18 lines
342 B
Zig

const std = @import("std");
const expect = std.testing.expect;
pub fn List(comptime T: type) type {
return u32;
}
const ElementList = List(Element);
const Element = struct {
link: ElementList,
};
test "false dependency loop in struct definition" {
const listType = ElementList;
var x: listType = 42;
expect(x == 42);
}