Skip to content

Instantly share code, notes, and snippets.

@prime31
Created March 10, 2012 01:37
Show Gist options
  • Save prime31/2009622 to your computer and use it in GitHub Desktop.
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
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