mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 16:13:19 +00:00
[macros]: Remove type argument from StaticTypeImpl
This is a follow-up to the previous CL adding support for named static types and instantiations to macros (https://dart-review.googlesource.com/c/sdk/+/348920). The type argument on `StaticTypeImpl` was not necessary so this CL removes it. Change-Id: I1e309c819be86f7f81ba4b7a418ed1f22ba7ac8b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368424 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Jake Macdonald <jakemac@google.com>
This commit is contained in:
parent
8e168fc9f1
commit
ff6e1df848
|
@ -1,3 +1,7 @@
|
|||
## 0.3.0
|
||||
|
||||
- Remove type parameter on internal `StaticType` implementation.
|
||||
|
||||
## 0.2.0
|
||||
|
||||
- Add identifiers to `NamedStaticType`.
|
||||
|
|
|
@ -103,7 +103,7 @@ abstract interface class StaticType {
|
|||
/// to the [declaration] passed here, while also being a supertype of `this`
|
||||
/// type.
|
||||
///
|
||||
/// This is useful to obtain the type parameters required for a known
|
||||
/// This is useful to obtain the type arguments required for a known
|
||||
/// superclass. Consider a class defined as `class MyMap implements
|
||||
/// Map<Foo, Bar>` and a macro interested in dealing with maps. Once that
|
||||
/// macro has resolved `MyMap` to a static type, it would call [asInstanceOf]
|
||||
|
|
|
@ -85,8 +85,7 @@ class NamedTypeAnnotationImpl extends TypeAnnotationImpl
|
|||
}
|
||||
}
|
||||
|
||||
class StaticTypeImpl<T extends StaticType> extends RemoteInstance
|
||||
implements StaticType {
|
||||
class StaticTypeImpl extends RemoteInstance implements StaticType {
|
||||
StaticTypeImpl(super.id);
|
||||
|
||||
@override
|
||||
|
@ -111,8 +110,7 @@ class StaticTypeImpl<T extends StaticType> extends RemoteInstance
|
|||
}
|
||||
}
|
||||
|
||||
class NamedStaticTypeImpl extends StaticTypeImpl<NamedStaticType>
|
||||
implements NamedStaticType {
|
||||
class NamedStaticTypeImpl extends StaticTypeImpl implements NamedStaticType {
|
||||
@override
|
||||
final ParameterizedTypeDeclarationImpl declaration;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: _macros
|
||||
version: 0.2.0
|
||||
version: 0.3.0
|
||||
description: >-
|
||||
This is a private SDK vendored package, which is re-exported by the public
|
||||
`macros` package, which is a pub package. Every change to this package is
|
||||
|
|
|
@ -1276,13 +1276,13 @@ class _DefinitionPhaseIntrospector extends _DeclarationPhaseIntrospector
|
|||
}
|
||||
}
|
||||
|
||||
class _InterfaceTypeImpl extends _StaticTypeImpl<macro.NamedStaticType>
|
||||
class _InterfaceTypeImpl extends _StaticTypeImpl
|
||||
implements macro.NamedStaticTypeImpl {
|
||||
@override
|
||||
final macro.ParameterizedTypeDeclarationImpl declaration;
|
||||
|
||||
@override
|
||||
final List<macro.StaticTypeImpl<macro.StaticType>> typeArguments;
|
||||
final List<macro.StaticTypeImpl> typeArguments;
|
||||
|
||||
_InterfaceTypeImpl(
|
||||
super.id, {
|
||||
|
@ -1341,8 +1341,7 @@ class _MacroTarget {
|
|||
});
|
||||
}
|
||||
|
||||
class _StaticTypeImpl<T extends macro.StaticType>
|
||||
extends macro.StaticTypeImpl<T> {
|
||||
class _StaticTypeImpl extends macro.StaticTypeImpl {
|
||||
final TypeSystemImpl typeSystem;
|
||||
final _DeclarationPhaseIntrospector introspector;
|
||||
final DartType type;
|
||||
|
|
|
@ -13,7 +13,7 @@ dependencies:
|
|||
convert: ^3.0.0
|
||||
crypto: ^3.0.0
|
||||
glob: ^2.0.0
|
||||
macros: '>=0.1.1-0 <0.1.2'
|
||||
macros: '>=0.1.2-0 <0.1.3'
|
||||
meta: ^1.15.0
|
||||
package_config: ^2.0.0
|
||||
path: ^1.9.0
|
||||
|
|
|
@ -311,8 +311,7 @@ class MacroTypes {
|
|||
}
|
||||
}
|
||||
|
||||
class _StaticTypeImpl<T extends macro.StaticType>
|
||||
extends macro.StaticTypeImpl<T> {
|
||||
class _StaticTypeImpl extends macro.StaticTypeImpl {
|
||||
final MacroTypes types;
|
||||
final DartType type;
|
||||
|
||||
|
@ -372,7 +371,7 @@ class _StaticTypeImpl<T extends macro.StaticType>
|
|||
}
|
||||
}
|
||||
|
||||
class _NamedStaticTypeImpl extends _StaticTypeImpl<macro.NamedStaticType>
|
||||
class _NamedStaticTypeImpl extends _StaticTypeImpl
|
||||
implements macro.NamedStaticType {
|
||||
@override
|
||||
final macro.ParameterizedTypeDeclaration declaration;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## 0.1.2-main.0
|
||||
|
||||
- Remove type parameter on internal `StaticType` implementation.
|
||||
|
||||
## 0.1.1-main.0
|
||||
|
||||
- Add identifiers to `NamedStaticType`.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: macros
|
||||
version: 0.1.1-main.0
|
||||
version: 0.1.2-main.0
|
||||
description: >-
|
||||
This package is for macro authors, and exposes the APIs necessary to write
|
||||
a macro. It exports the APIs from the private `_macros` SDK vendored package.
|
||||
|
@ -11,4 +11,4 @@ environment:
|
|||
dependencies:
|
||||
_macros:
|
||||
sdk: dart
|
||||
version: 0.2.0
|
||||
version: 0.3.0
|
||||
|
|
Loading…
Reference in a new issue