Created
September 27, 2012 10:43
-
-
Save nyuichi/3793400 to your computer and use it in GitHub Desktop.
shadowing
This file contains hidden or 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
| 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