// Copyright (c) 2011, 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. // Test for F-Bounded Quantification. class FBound> {} class Bar extends FBound {} class SubBar extends Bar {} class Baz extends FBound> {} class SubBaz extends Baz {} main() { FBound fb = new FBound(); FBound fsb = new FBound(); // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS // ^ // [cfe] Type argument 'SubBar' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^ // [cfe] Type argument 'SubBar' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS FBound> fbb = new FBound>(); FBound> fsbb = new FBound>(); // ^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS // ^ // [cfe] Type argument 'SubBaz' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^ // [cfe] Type argument 'SubBaz' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. // ^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS }