Fix for a stupid copy/paste bug in the incremental resolver.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1360583003 .
This commit is contained in:
Konstantin Shcheglov 2015-09-21 09:17:35 -07:00
parent ecc9b87690
commit 3aabaa96e6
2 changed files with 5 additions and 3 deletions

View file

@ -1715,8 +1715,8 @@ class PoorMansIncrementalResolver {
_newSourceEntry.setValueIncremental(SCAN_ERRORS, _newScanErrors, true);
_newSourceEntry.setValueIncremental(LINE_INFO, _newLineInfo, false);
// parse results
_newSourceEntry.setValueIncremental(PARSE_ERRORS, _newScanErrors, true);
_newSourceEntry.setValueIncremental(PARSED_UNIT, _newScanErrors, false);
_newSourceEntry.setValueIncremental(PARSE_ERRORS, _newParseErrors, true);
_newSourceEntry.setValueIncremental(PARSED_UNIT, _oldUnit, false);
}
void _updateEntry_OLD() {

View file

@ -4498,8 +4498,10 @@ f3() {
expect(newUnit.element, isNot(same(oldUnitElement)));
return;
}
// The existing CompilationUnitElement should be updated.
// The existing CompilationUnit[Element] should be updated.
expect(newUnit, same(oldUnit));
expect(newUnit.element, same(oldUnitElement));
expect(analysisContext.parseCompilationUnit(source), same(oldUnit));
// The only expected pending task should return the same resolved
// "newUnit", so all clients will get it using the usual way.
AnalysisResult analysisResult = analysisContext.performAnalysisTask();