2 // Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 public class A
{ public function id
() { return "p1.A"; } }
23 public class B
{ public static function id
() { return "p1.B"; } }
27 public class A
{ public function id
() { return "p2.A"; } }
28 public class B
{ public static function id
() { return "p2.B"; } }
34 import flash
.display
.MovieClip;
36 public class Main
extends MovieClip {
43 // This is not that hard at all, as the compiler should generate
44 // the code specifying which namespace to look in.
45 public function Main
() {
49 // Check that functions work at all...
50 check_equals
(typeof(a
.id
()), "string");
52 // Check non-static function lookup
53 check_equals
(a
.id
(), "p1.A");
55 // Check static function lookup.
56 check_equals
(B
.id
(), "p1.B");