@@ -687,7 +687,7 @@ class LibraryUpdater extends JsFeatures {
|
||||
PartialFunctionElement before,
|
||||
PartialFunctionElement after) {
|
||||
FunctionExpression node =
|
||||
after.parseNode(compiler).asFunctionExpression();
|
||||
after.parseNode(compiler.parsing).asFunctionExpression();
|
||||
if (node == null) {
|
||||
return cannotReuse(after, "Not a function expression: '$node'");
|
||||
}
|
||||
@@ -709,7 +709,7 @@ class LibraryUpdater extends JsFeatures {
|
||||
Token diffToken,
|
||||
PartialClassElement before,
|
||||
PartialClassElement after) {
|
||||
ClassNode node = after.parseNode(compiler).asClassNode();
|
||||
ClassNode node = after.parseNode(compiler.parsing).asClassNode();
|
||||
if (node == null) {
|
||||
return cannotReuse(after, "Not a ClassNode: '$node'");
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ class ScopeInformationVisitor extends BaseElementVisitor/* <void> */ {
|
||||
{bool isStatic: false,
|
||||
bool omitEnclosing: false,
|
||||
bool includeSuper: false}) {
|
||||
e.ensureResolved(compiler);
|
||||
e.ensureResolved(compiler.resolution);
|
||||
bool isFirst = true;
|
||||
var serializeEnclosing;
|
||||
String kind;
|
||||
@@ -231,7 +231,7 @@ class ScopeInformationVisitor extends BaseElementVisitor/* <void> */ {
|
||||
if (category == ElementCategory.FUNCTION ||
|
||||
category == ElementCategory.VARIABLE ||
|
||||
element.isConstructor) {
|
||||
type = element.computeType(compiler);
|
||||
type = element.computeType(compiler.resolution);
|
||||
}
|
||||
if (name == null) {
|
||||
name = element.name;
|
||||
|
||||
@@ -40,7 +40,7 @@ class ApplyUpdateTestCase extends LibraryUpdaterTestCase {
|
||||
Future run() => loadMainApp().then((LibraryElement library) {
|
||||
// Capture the current version of [before] before invoking the [updater].
|
||||
PartialFunctionElement before = library.localLookup(expectedUpdate);
|
||||
var beforeNode = before.parseNode(compiler);
|
||||
var beforeNode = before.parseNode(compiler.parsing);
|
||||
|
||||
var context = new IncrementalCompilerContext();
|
||||
LibraryUpdater updater =
|
||||
@@ -56,10 +56,10 @@ class ApplyUpdateTestCase extends LibraryUpdaterTestCase {
|
||||
|
||||
// Check that the [updater] didn't modify the changed element.
|
||||
Expect.identical(before, update.before);
|
||||
Expect.identical(beforeNode, before.parseNode(compiler));
|
||||
Expect.identical(beforeNode, before.parseNode(compiler.parsing));
|
||||
|
||||
PartialFunctionElement after = update.after;
|
||||
var afterNode = after.parseNode(compiler);
|
||||
var afterNode = after.parseNode(compiler.parsing);
|
||||
|
||||
// Check that pretty-printing the elements match [source] (before), and
|
||||
// [newSource] (after).
|
||||
@@ -72,7 +72,7 @@ class ApplyUpdateTestCase extends LibraryUpdaterTestCase {
|
||||
|
||||
// Check that the update was applied by pretty-printing [before]. Make no
|
||||
// assumptions about [after], as the update may destroy that element.
|
||||
beforeNode = before.parseNode(compiler);
|
||||
beforeNode = before.parseNode(compiler.parsing);
|
||||
Expect.notEquals(source, '$beforeNode');
|
||||
Expect.stringEquals(newSource, '$beforeNode');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user