mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 14:32:24 +00:00
2b79d2b747
Various cleanups to the TypeBuilder classes: TypeBuilder: * Remove `origin` parameter from TypeBuilder.build and instead make FunctionType.typedefType mutable and set if after creation. * Remove `charOffset` and `fileUri` parameters from TypeBuilder.buildSupertype/buildMixedInType * Remove `bind`, `resolveIn`, and `check` from TypeBuilder so that these are only present on NamedTypeBuilder * Remove TypeBuilder.buildTypeLiteralType and instead pass an argument to NamedTypeBuilder that determines what type to create on `build`. NamedTypeBuilder: * Make NamedTypeBuilder.instanceTypeVariableAccess private * Add NamedTypeBuilder.forDartType for prebuilt types * Add NamedTypeBuilder.forInvalidType for types created for errors * Make NamedTypeBuilder.declaration private and corresponding getter * Check most type use errors on NamedTypeBuilder.bind * Make NamedTypeBuilder helper methods private * Add `TypeVariableBuilder.isClassParameter` to support checking for valid type variable use through the `NamedTypeBuilder.bind` method. * Remove checking of type variable in static context from BodyBuilder since it is now checking on `NamedTypeBuilder.bind`. FunctionTypeBuilder: * Cache result of FunctionTypeBuilder.build TypeBuilderComputer: * Cache "constant" type declarations in TypeBuilderComputer Change-Id: Ibaedcb255487eecc5efe70b84e5cbd5a118c1e0b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239023 Reviewed-by: Jens Johansen <jensj@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com> |
||
---|---|---|
.. | ||
bound_test.dart | ||
inheritance_runtime_test.dart | ||
inheritance_test.dart | ||
malformed2_lib.dart | ||
malformed2_test.dart | ||
malformed_test.dart | ||
runtime_test.dart | ||
type_test.dart |