Skip to content

Instantly share code, notes, and snippets.

@edmundito
Last active December 11, 2015 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edmundito/4527126 to your computer and use it in GitHub Desktop.
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!
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