Created
October 10, 2014 05:43
-
-
Save zakki/7920385a421f6af40638 to your computer and use it in GitHub Desktop.
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 A { | |
public a() { | |
alert("A!"); | |
} | |
} | |
class B extends A { | |
public b() { | |
alert("B!"); | |
} | |
} | |
var bs: B[] = [new B(), new B()]; | |
var as: A[] = bs; | |
as[1] = new A(); | |
as.forEach(a => a.a()); | |
bs.forEach(b => b.b()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment