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

Hash Type Checking #6959

Closed
KCErb opened this issue Oct 19, 2018 · 2 comments
Closed

Hash Type Checking #6959

KCErb opened this issue Oct 19, 2018 · 2 comments

Comments

@KCErb
Copy link
Contributor

KCErb commented Oct 19, 2018

Sorry if I missed this somewhere else, seems pretty basic.

test = Hash(String, String).new
test[32]

This shouldn't compile right? The key's type is wrong. But it does compile and throws a runtime error "Missing hash key 32".

I can see wanting this to compile if I'd provided a block or something, but otherwise I don't see the value of passing this one on to run time.

@Sija
Copy link
Contributor

Sija commented Oct 19, 2018

Duplicate of #2996

@KCErb
Copy link
Contributor Author

KCErb commented Oct 19, 2018

Oops, I see, bad issue search I guess. Thanks @Sija!

@KCErb KCErb closed this as completed Oct 19, 2018
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