blob: f9fb682929c749c8c4a1fe0f67a484b183e00f0b [file] [log] [blame]
// Copyright (c) 2024, 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 It is a compile-time error if:
/// ...
/// - The type parameters of the type augmentation do not match the original
/// type's type parameters. This means there must be the same number of type
/// parameters with the same bounds and names.
///
/// @description Checks that it is a compile-time error if an augmenting type
/// declares wrong number of type parameters
/// @author sgrekhov22@gmail.com
// SharedOptions=--enable-experiment=macros
augment library 'augmenting_types_A05_t01.dart';
augment class C {}
// ^
// [analyzer] unspecified
// [cfe] unspecified
augment class C<T, X> {}
// ^^^^
// [analyzer] unspecified
// [cfe] unspecified
augment mixin M {}
// ^
// [analyzer] unspecified
// [cfe] unspecified
augment mixin M<T, X> {}
// ^^^^
// [analyzer] unspecified
// [cfe] unspecified
augment enum E {
// ^
// [analyzer] unspecified
// [cfe] unspecified
augment e1;
}
augment enum E<T, X> {
// ^^^^
// [analyzer] unspecified
// [cfe] unspecified
augment e1;
}
augment extension Ext {}
// ^^^
// [analyzer] unspecified
// [cfe] unspecified
augment extension Ext<T, X> {}
// ^^^^
// [analyzer] unspecified
// [cfe] unspecified