// 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. // ignore_for_file: native_function_body_in_non_sdk_code class Base { T1 t1; T2 t2; Base() { print('Base: $T1, $T2'); } } class A extends Base { A(String s); } class B extends Base, String> { B() { print('B: $T'); } } class C { C(String s) { print('C: $s'); } } foo1() => new C('hello'); void foo2() { new A('hi'); new B(); } void foo3() { new B>(); } class E { test_reuse1() => new Map(); } class F extends E> { test_reuse2() => new Map>(); } class G { G(); factory G.test_factory() => new H(); } class H extends G {} void foo4() { new G>.test_factory(); } class I { I(param); factory I.test_factory2({param}) => new I(param); } void foo5() { new I.test_factory2(); new I.test_factory2(param: 42); } class J { factory J() native "agent_J"; } abstract class K { factory K() => new TestTypeArgReuse(); } class TestTypeArgReuse extends Base implements K {} foo6() => new List(); foo7(int n) => new List(n); main() { foo1(); foo2(); foo3(); }