Skip to content
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

@compileLog should resolve lazy values #3193

Closed
daurnimator opened this issue Sep 8, 2019 · 1 comment · Fixed by #3209
Closed

@compileLog should resolve lazy values #3193

daurnimator opened this issue Sep 8, 2019 · 1 comment · Fixed by #3209
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase. stage1 The process of building from source via WebAssembly and the C backend.
Milestone

Comments

@daurnimator
Copy link
Contributor

    const S = packed struct {_1: u1, x: u7, _: u24};
    @compileLog(@sizeOf(S));

Gives me

| (lazy value)

I can't see any reason for that value to be lazy: is there a way to force evaluation?

(Found while investigating #2627 (comment) )

@daurnimator daurnimator added the question No questions on the issue tracker, please. label Sep 8, 2019
@andrewrk andrewrk added this to the 0.6.0 milestone Sep 10, 2019
@andrewrk
Copy link
Member

I think @compileLog should force it.

@andrewrk andrewrk added enhancement Solving this issue will likely involve adding new logic or components to the codebase. stage1 The process of building from source via WebAssembly and the C backend. and removed question No questions on the issue tracker, please. labels Sep 10, 2019
@andrewrk andrewrk changed the title How to force evaluation of lazy variable? @compileLog should resolve lazy values Sep 10, 2019
LemonBoy added a commit to LemonBoy/zig that referenced this issue Sep 10, 2019
andrewrk pushed a commit that referenced this issue Sep 10, 2019
@andrewrk andrewrk modified the milestones: 0.6.0, 0.5.0 Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase. stage1 The process of building from source via WebAssembly and the C backend.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants