Skip to content

doc: name of anonymous struct is strange #1243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bronze1man opened this issue Jul 15, 2018 · 1 comment
Closed

doc: name of anonymous struct is strange #1243

bronze1man opened this issue Jul 15, 2018 · 1 comment
Labels
Milestone

Comments

@bronze1man
Copy link

bronze1man commented Jul 15, 2018

Please document how the name of anonymous struct is get.

const std = @import("std");

pub fn main() !void {
    var stdout_file = try std.io.getStdOut();
    std.debug.warn("{}\n",@typeName(struct{}) );
}

Above code return main()

The document may be come from #160

@andrewrk andrewrk added this to the 0.3.0 milestone Jul 16, 2018
@tiehuis tiehuis added the docs label Jul 23, 2018
@andrewrk
Copy link
Member

andrewrk commented Sep 3, 2018

Your example now prints (test.zig:5:38) and I added docs: https://ziglang.org/documentation/master/#struct-naming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants