// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // @dart = 2.7 // dart2jsOptions=--strong @JS() library foo; import 'package:expect/expect.dart'; import 'package:js/js.dart'; @JS() @anonymous class A { external factory A(); } class B {} @JS() @anonymous class C implements B { external factory C(); } class D {} @JS() @anonymous class E implements B { external factory E(); } main() { test(new A()); test(new A()); test(new C()); test(new E()); } test(o) { Expect.isTrue(o is A, "Expected $o to be A"); Expect.isTrue(o is A, "Expected $o to be A"); Expect.isTrue(o is B, "Expected $o to be B"); Expect.isTrue(o is B, "Expected $o to be B"); Expect.isFalse(o is D, "Expected $o not to be D"); }