blob: a2bad8408b1837191cce61b897f1d8ab56592879 [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.
// @dart = 2.9
// Requirements=nnbd-weak
// SharedOptions=--enable-experiment=nonfunction-type-aliases
// Test that a generic type alias `T` denoting `Object`
// can give rise to the expected errors.
import 'dart:async';
import 'generic_usage_object_error_lib.dart';
// Use the aliased type.
abstract class C {}
abstract class D2 extends C with T<int> {}
// ^
// [analyzer] unspecified
// [cfe] unspecified
abstract class D4 = C with T<void>;
// ^
// [analyzer] unspecified
// [cfe] unspecified
main() {
T<Null>.named();
// ^
// [analyzer] unspecified
// [cfe] unspecified
T<List<List<List<List>>>>.staticMethod<T<int>>();
// ^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}