We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 577fc04 commit ae5534aCopy full SHA for ae5534a
pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
@@ -50,7 +50,7 @@ class DartChangeBuilderImpl extends ChangeBuilderImpl
50
@override
51
Future<DartFileEditBuilderImpl> createFileEditBuilder(String path) async {
52
ResolveResult result = await session.getResolvedAst(path);
53
- ResultState state = result.state;
+ ResultState state = result?.state ?? ResultState.INVALID_FILE_TYPE;
54
if (state == ResultState.INVALID_FILE_TYPE) {
55
throw new AnalysisException('Cannot analyze "$path"');
56
}
0 commit comments