Last active
December 11, 2015 01:59
-
-
Save edmundito/4527126 to your computer and use it in GitHub Desktop.
Experiment to see if Class objects can point to interfaces. It does work!
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
package | |
{ | |
import flash.display.Sprite; | |
public class InterfacePointerExperiment extends Sprite | |
{ | |
public function InterfacePointerExperiment() | |
{ | |
var clsA:Class = IExample; | |
var clsB:Class = IExample; | |
if (clsA == clsB) | |
{ | |
trace("Comparing two Class objects pointing to the same Interface is possible!"); | |
} | |
if (clsA == IExample) | |
{ | |
trace("Comparing a Class object to the direct Interface is possible!"); | |
} | |
} | |
} | |
} | |
interface IExample | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment