| Index: dart/tests/compiler/dart2js_foreign/native_class_avoids_hidden_name_test.dart
|
| diff --git a/dart/tests/compiler/dart2js_foreign/native_class_avoids_hidden_name_test.dart b/dart/tests/compiler/dart2js_foreign/native_class_avoids_hidden_name_test.dart
|
| index ff4be42b2930793adc9982820f701122336220f6..99f53b52921df4693bd4f271e70c2c9621daa8b2 100644
|
| --- a/dart/tests/compiler/dart2js_foreign/native_class_avoids_hidden_name_test.dart
|
| +++ b/dart/tests/compiler/dart2js_foreign/native_class_avoids_hidden_name_test.dart
|
| @@ -4,12 +4,14 @@
|
|
|
| // Test that hidden native class names are not used by generated code.
|
|
|
| -class A native "*B" {
|
| +@native("*B")
|
| +class A {
|
| get name => 'A';
|
| static A create() => makeA();
|
| }
|
|
|
| -class B native "*C" {
|
| +@native("*C")
|
| +class B {
|
| get name => 'B';
|
| static B create() => makeB();
|
| }
|
| @@ -19,23 +21,25 @@ class C { // Ordinary class with name clashing with native class.
|
| static C create() => new C();
|
| }
|
|
|
| -makeA() native;
|
| -makeB() native;
|
| +@native makeA();
|
| +@native makeB();
|
|
|
| -void setup1() native """
|
| +@native("""
|
| // Poison hidden native names 'B' and 'C' to prove the compiler didn't place
|
| // anthing on the hidden native class.
|
| B = null;
|
| C = null;
|
| -""";
|
| +""")
|
| +void setup1();
|
|
|
| -void setup2() native """
|
| +@native("""
|
| // This code is all inside 'setup' and so not accesible from the global scope.
|
| function B(){}
|
| function C(){}
|
| makeA = function(){return new B}; // A is "*B"
|
| makeB = function(){return new C}; // B is "*C"
|
| -""";
|
| +""")
|
| +void setup2();
|
|
|
| int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
|
|
|
|
|