// Copyright (c) 2012, 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 test program for testing factory generic result types. class A { A() {} factory A.factory() { return new A(); // //# 00: compile-time error return A(); } } class B extends A { B() {} factory B.factory() { return new B(); // //# 01: compile-time error return B(); } } main() { new A.factory(); new A.factory(); // //# 00: dynamic type error new B.factory(); new B.factory(); // //# 01: dynamic type error }