Skip to content

on second thought #2

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

on second thought #2

wants to merge 1 commit into from

Conversation

zapnap
Copy link

@zapnap zapnap commented Dec 7, 2010

seems to me that a type shouldn't be assigned on variable initialization if the assignment is to nil / null. perhaps this failure is intentional? still seems odd / like a bug. but i'm new to mirah, so it may be that this is just a naive point of view. clarification would be awesome -- thanks in advance!

@baroquebobcat
Copy link
Member

So this is just casting nil upfront? I think the typer is smart enough to not need that. eg

x = nil
x = "string"

on compilation, I think x's type will be String.

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

Successfully merging this pull request may close these issues.

2 participants