f7ef66f5b0
In theory discoverAvailableFiles() should wait for all possibly known files to be discovered. But I think it is still possible to get the set of known files changed, e.g. when are asking asynchronoiusly for getIndex() and the user open a file that is not yet part of any driver. Only the second hunk of the change (inside subtypes()) is required for fixing the issue, the crucial change is toList() invocation. The switch from _driver.knownFiles to _driver.fsState.knownFiles is done to avoid one extra lookup for FileState. The first hunk (inside declarations()) is done just for consistency. Fixes https://github.com/dart-lang/sdk/issues/33412 R=paulberry@google.com Change-Id: I652ef7a156eba4bf0298c7e863dcef2b7c9f2b0e Reviewed-on: https://dart-review.googlesource.com/60142 Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Paul Berry <paulberry@google.com>