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

ZIG 0.9 Unused constant error #62

Closed
voltflake opened this issue Jul 1, 2021 · 1 comment
Closed

ZIG 0.9 Unused constant error #62

voltflake opened this issue Jul 1, 2021 · 1 comment

Comments

@voltflake
Copy link

New compiler gives error on zigling 51, when demonstrating data segment storage.

Code

// However, this "skull_farmer" character will be put in the
// global immutable data even though it's defined in a function.
// Since it's immutable, all invocations of the function can share
// this one value.

const skull_farmer = Character{};

Result

Compiling 051_values.zig...
051_values.zig:77:11: error: unused local constant
    const skull_farmer = Character{};
          ^
@ratfactor
Copy link
Owner

Yeah, I got this one. There were a bunch!

https://github.com/ratfactor/ziglings/commits/main

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

No branches or pull requests

2 participants