dart-sdk/tests/language/nonfunction_type_aliases/mixed/generic_usage_class_error_lib.dart
Erik Ernst 822d353256 Update non-function type alias tests
The non-function type alias feature will no longer be supported in
legacy code. This CL moves all the tests on this topic in language_2
to language/nonfunction_type_aliases/mixed. This CL also splits each
of the tests in a legacy part (with @dart and Requirements) and a part
with null safety (containing the non-function type alias declarations
and a bit of code that it depends on), such that we are testing that
non-function type aliases can be used in mixed-version programs, as
long as they are declared in an opted-in library.

Change-Id: Ie1ba3511c95f48d98f6ed7ed56e362895b9d3b19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184460
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-02-23 16:28:20 +00:00

14 lines
340 B
Dart

// Copyright (c) 2021, 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.
// Introduce an aliased type.
class A<X> {
A();
A.named();
static void staticMethod<Y>() {}
}
typedef T<X> = A<X>;