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

declare allows initializer, but ignores it #118

Open
cspiel opened this issue Jun 4, 2019 · 0 comments
Open

declare allows initializer, but ignores it #118

cspiel opened this issue Jun 4, 2019 · 0 comments

Comments

@cspiel
Copy link
Collaborator

cspiel commented Jun 4, 2019

OMake allows a declare instruction to take an
initializer, but silently ignores it. The
documentation (see Section 5.7) does not
mention this "extension".

declare public.X = init

#  Uncomment the next line to force "unbound variable: ..." error.
#println($"+ X = <$(public.X)>")

public.X = assign
println($"+ X = <$(public.X)>")

IMHO it would be preferable to have a warning in
such cases, like, e.g. "initialization ignored".

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

1 participant