Skip to content

on second thought - #2

Open
zapnap wants to merge 1 commit into
mirah:masterfrom
zapnap:master
Open

on second thought#2
zapnap wants to merge 1 commit into
mirah:masterfrom
zapnap:master

Conversation

@zapnap

@zapnap zapnap commented Dec 7, 2010

Copy link
Copy Markdown

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
Copy Markdown
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