blob: f5708feb7168a7492ea092f805d381280e3096e6 [file] [log] [blame]
// Copyright (c) 2015, 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.
// SharedOptions=--experimental-trust-js-interop-type-annotations
// Same test as js_typed_interop_anonymous2, but using the
// --experimental-trust-js-interop-type-annotations flag.
library js_typed_interop_anonymous2_exp_test;
import 'dart:html';
import 'dart:js' as js;
import 'package:js/js.dart';
import 'package:unittest/unittest.dart';
import 'package:unittest/html_config.dart';
class A {
external factory A({B b});
external B get b;
class B {
external factory B({C c});
external C get c;
class C {
external factory C();
// D is unreachable, and that is OK
class D {
external factory D();
main() {
test('simple', () {
var b = new B();
var a = new A(b: b);
expect(a.b, equals(b));
expect(b.c, isNull);