mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
Disambiguate setters and getters when patching DDC SDK.
Stdio was having its setters applied twice instead of applying the getter and setter each once. R=vsm@google.com Review-Url: https://codereview.chromium.org/2874713005 .
This commit is contained in:
parent
17c23be470
commit
a68b44924e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -349,13 +349,23 @@ class PatchFinder extends GeneralizingAstVisitor {
|
|||
}
|
||||
|
||||
String _qualifiedName(Declaration node) {
|
||||
var result = "";
|
||||
|
||||
var parent = node.parent;
|
||||
var className = '';
|
||||
if (parent is ClassDeclaration) {
|
||||
className = parent.name.name + '.';
|
||||
result = "${parent.name.name}.";
|
||||
}
|
||||
|
||||
var name = (node as dynamic).name;
|
||||
return className + (name != null ? name.name : '');
|
||||
if (name != null) result += name.name;
|
||||
|
||||
// Make sure setters and getters don't collide.
|
||||
if ((node is FunctionDeclaration || node is MethodDeclaration) &&
|
||||
(node as dynamic).isSetter) {
|
||||
result += "=";
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool _isPatch(AnnotatedNode node) => node.metadata.any(_isPatchAnnotation);
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
[error] A value of type 'Dimension' can't be assigned to a variable of type 'num'. (dart:html, line 40486, col 44)
|
||||
[error] The getter 'value' isn't defined for the class 'num'. (dart:html, line 40506, col 20)
|
||||
[error] A value of type 'Dimension' can't be assigned to a variable of type 'num'. (dart:html, line 40506, col 42)
|
||||
[error] Undefined name 'lineMode'. (dart:io/stdio.dart, line 57, col 10)
|
||||
[error] The name 'echoMode=' is already defined. (dart:io/stdio.dart, line 122, col 12)
|
||||
[error] The name 'lineMode=' is already defined. (dart:io/stdio.dart, line 143, col 12)
|
||||
[error] The getter 'packagesBase' isn't defined for the class 'IsolateNatives'. (dart:isolate, line 719, col 61)
|
||||
[error] Invalid override. The type of 'JsArray.[]=' ('(Object, E) → void') isn't a subtype of 'JsObject.[]=' ('(Object, dynamic) → dynamic'). (dart:js, line 370, col 3)
|
||||
[error] The argument type 'List' can't be assigned to the parameter type 'Iterable<Null>'. (dart:js_util, line 112, col 29)
|
||||
|
|
Loading…
Reference in a new issue