blob: 1bddbc3d467f9e1435f79b18a618ffd6a4c453df [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.
// SharedOptions=--enable-experiment=nonfunction-type-aliases
import 'dart:async';
// Introduce an aliased type.
typedef T<X> = void;
// Use the aliased type.
abstract class C {
final T<Null> v7;
C(): v7 = T();
// ^
// [analyzer] unspecified
// [cfe] unspecified
}
class D1<X> extends T<X> {}
// ^
// [analyzer] unspecified
// [cfe] unspecified
abstract class D2 extends C with T<int> {}
// ^
// [analyzer] unspecified
// [cfe] unspecified
abstract class D3<X, Y> implements T<T> {}
// ^
// [analyzer] unspecified
// [cfe] unspecified
abstract class D4 = C with T<void>;
// ^
// [analyzer] unspecified
// [cfe] unspecified
extension E on T<dynamic> {
T<dynamic> foo(T<dynamic> t) => t;
}
X foo<X>(X x) => x;
main() {
var v8 = <T<C>>[];
var v9 = <Set<T<T>>, Set<T<T>>>{{}: {}};
var v10 = {v8};
v9[{}] = {T<T>()};
// ^
// [analyzer] unspecified
// [cfe] unspecified
Set<List<T<C>>> v11 = v10;
v10 = v11;
T<Null>();
//^
// [analyzer] unspecified
// [cfe] unspecified
T<Null>.named();
//^
// [analyzer] unspecified
// [cfe] unspecified
T<Object> v12 = foo<T<bool>>(T<bool>());
// ^
// [analyzer] unspecified
// [cfe] unspecified
T<List<List<List<List>>>>.staticMethod<T<int>>();
// ^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}