mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:57:35 +00:00
Enable the null safety understanding flag in _computeResolvedLibrary.
This is the _compute function used by the migration tool. It needs to set the null safety understanding flag in order to ensure that type comparisons work properly when analyzing code that's already been migrated. Fixes #42308. Bug: https://github.com/dart-lang/sdk/issues/42308 Change-Id: I347b99a3a2cc772bb158b2ba8621ac7bb632653a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167260 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
This commit is contained in:
parent
284c78d338
commit
d0fafb6329
|
@ -1343,6 +1343,12 @@ class AnalysisDriver implements AnalysisDriverGeneric {
|
|||
/// Return the newly computed resolution result of the library with the
|
||||
/// given [path].
|
||||
ResolvedLibraryResultImpl _computeResolvedLibrary(String path) {
|
||||
return NullSafetyUnderstandingFlag.enableNullSafetyTypes(
|
||||
() => _computeResolvedLibrary2(path));
|
||||
}
|
||||
|
||||
/// Unwrapped implementation of [_computeResolvedLibrary].
|
||||
ResolvedLibraryResultImpl _computeResolvedLibrary2(String path) {
|
||||
FileState library = _fsState.getFileForPath(path);
|
||||
|
||||
return _logger.run('Compute resolved library $path', () {
|
||||
|
|
Loading…
Reference in a new issue