Konstantin Scheglov
Konstantin Scheglov
FWIW, we have ```dart abstract class RecordType implements DartType { /// Creates a record type from of [positional] and [named] fields. factory RecordType({ required List positional, required Map named, required...
Almost. `FunctionType.element` is wrong for this purpose, and returns `GenericFunctionTypeElement`, and I'd like to migrate it to `FunctionTypeAliasElement` instead. And we also have `FunctionType.typeArguments` if it is a typedef. So,...
@srawlins Can it be an issue with enhanced `Deprecated` handling?
Right, using an older version of the analyzer sounds as the best explanation to me. Maybe actually Dart SDK was updated in place.
We don't have experimental flags easily when we format. We convert experiments into `FeatureSet`, and this is what `parseString()` wants. So, I propose that `DartFormatter` accepts `FeatureSet` instead.
Something like this ```dart import 'package:analyzer/dart/analysis/analysis_context_collection.dart'; import 'package:analyzer/dart/analysis/results.dart'; import 'package:analyzer/file_system/overlay_file_system.dart'; import 'package:analyzer/file_system/physical_file_system.dart'; Future main() async { var resourceProvider = OverlayResourceProvider( PhysicalResourceProvider.INSTANCE, ); var workspacePath = '/workspace'; var testPackageRootPath = '$workspacePath/test';...
Similarly to https://github.com/dart-lang/sdk/issues/49434, the parser does not know looking at `foo.bar` what it is, `importPrefix.topLevelGetter` or `object.hisProperty`. We could rewrite this while resolving.
Yes, it is. ```dart var a = 2; main() { foo(); print(a); // 2 } void foo() { var a = 1; print(a); } ``` Inlining `foo` gives us: ```dart...
No, probably not very soon.
The analyzer caches analysis results, such as diagnostics for files. The key for the cache is roughly based on the content of the Dart files, and the `DATA_VERSION` constant in...