Skip to content

Instantly share code, notes, and snippets.

@nyuichi
Created September 27, 2012 10:43
Show Gist options
  • Select an option

  • Save nyuichi/3793400 to your computer and use it in GitHub Desktop.

Select an option

Save nyuichi/3793400 to your computer and use it in GitHub Desktop.
shadowing
class Base {}
class Derived extends Base {}
class _Main {
function method2(obj : Base) : void {
if (obj instanceof Derived) {
var obj = obj as Derived;
funcA(obj);
}
else {
funcB(obj);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment