mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 07:32:44 +00:00
17 lines
362 B
Zig
17 lines
362 B
Zig
|
const std = @import("std");
|
||
|
|
||
|
pub fn main() void {
|
||
|
const Foo = struct {};
|
||
|
std.debug.print("variable: {s}\n", .{@typeName(Foo)});
|
||
|
std.debug.print("anonymous: {s}\n", .{@typeName(struct {})});
|
||
|
std.debug.print("function: {s}\n", .{@typeName(List(i32))});
|
||
|
}
|
||
|
|
||
|
fn List(comptime T: type) type {
|
||
|
return struct {
|
||
|
x: T,
|
||
|
};
|
||
|
}
|
||
|
|
||
|
// exe=succeed
|