dart-sdk/tests/language_2/malformed
Johnni Winther 2b79d2b747 [cfe] Refactor TypeBuilders
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>
2022-03-28 18:22:50 +00:00
..
bound_test.dart
inheritance_runtime_test.dart
inheritance_test.dart [cfe] Refactor TypeBuilders 2022-03-28 18:22:50 +00:00
malformed2_lib.dart
malformed2_test.dart
malformed_test.dart
runtime_test.dart
type_test.dart