blob: 57dcea9809e3d8d8808b1ce3c1407feb78374aef [file] [log] [blame]
* Copyright (c) 2019, 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.
* @assertion In checked mode, it is a dynamic type error if a factory returns
* a non-null object whose type is not a subtype of its actual return type.
* @description Checks that returning an object of subtype of M
* from factory constructor M does not produce an error. Test type alias
* @author
// SharedOptions=--enable-experiment=nonfunction-type-aliases
abstract class A {
A() {}
factory { return new; }
class C extends A { {}
typedef CAlias = C;
main() {