blob: db434b5b9746146de3268a443cbe78674f6fd7f5 [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 A class declaration, type alias, or function [G] may be generic,
/// that is, [G] may have formal type parameters declared.
/// @description Checks various correct generic class declarations.
/// @author iefremov
abstract class I{}
class C1<T> {}
class C2<$, $$, $$$> {}
class C3<T extends C1?, S extends I?, V extends Function?> {}
class C4<T extends C3<U, S, V>?, U extends C1<U>?, V extends Function?,
S extends I?> {}
class C5<T extends C1<List<List<List<List>>>>> {}
class C6<T extends C1<C6<T>?>?> {}
class C7<T extends C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7
<C7<T>>>>>>>>>>>>>>>>>>>>>> {}
main() {
new C1<int>();
new C2<int, int, int>();
new C3<C1<int>, I, Function>();
new C4<Null, Null, Null, Null>();
new C5();
new C6<C1<C6<Never>>>();
new C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7<C7
new ManyParameters();
class ManyParameters<
T93,T94,T95,T96,T97,T98,T99,T100,T101> {}