Skip to content

Const declarations aren't typechecked #899

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
jruderman opened this issue Sep 10, 2011 · 0 comments
Closed

Const declarations aren't typechecked #899

jruderman opened this issue Sep 10, 2011 · 0 comments
Labels
A-type-system Area: Type system E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@jruderman
Copy link
Contributor

const i: str = 10;
fn main() { log i; }

Should give an error in typeck, but instead it gets to LLVM, which says

Assertion failed: (InitVal->getType() == getType()->getElementType() && "Initializer type must match GlobalVariable type"), function setInitializer, file Globals.cpp, line 168.
arielb1 pushed a commit to arielb1/rust that referenced this issue Apr 10, 2015
Amend RFC 517: Add material for stdio
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
coastalwhite pushed a commit to coastalwhite/rust that referenced this issue Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants