mirror of
https://github.com/ziglang/zig.git
synced 2026-01-13 19:05:12 +00:00
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.
14 lines
332 B
Zig
14 lines
332 B
Zig
const std = @import("std");
|
|
const expect = std.testing.expect;
|
|
|
|
const S = struct {
|
|
fn method() std.builtin.TypeInfo {
|
|
return @typeInfo(S);
|
|
}
|
|
};
|
|
|
|
test "functions with return type required to be comptime are generic" {
|
|
const ti = S.method();
|
|
expect(@as(std.builtin.TypeId, ti) == std.builtin.TypeId.Struct);
|
|
}
|