Created
March 10, 2012 01:37
-
-
Save prime31/2009622 to your computer and use it in GitHub Desktop.
an example of what will result in a compiler error when using UnityScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function jsIsReallySaddening() | |
{ | |
if( true ) | |
{ | |
var shouldBeLocallyScoped:boolean = true; | |
} | |
if( true ) | |
{ | |
// unbelievably, the compiler will error on this with "There is already a local variable with the name 'shouldBeLocallyScoped'" | |
var shouldBeLocallyScoped:boolean = true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment