Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(926)

Unified Diff: tests/lib_strong/collection/list_test.dart

Issue 2979353002: implement `Invocation.typeArguments` in DDC (Closed)
Patch Set: fix Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/lib_strong/collection/list_test.dart
diff --git a/tests/lib_strong/collection/list_test.dart b/tests/lib_strong/collection/list_test.dart
index a1fedcc1c00b196bde290b11f1f534fdcec36e03..f307a61ce642590ec5706bb61700698dacc169cf 100644
--- a/tests/lib_strong/collection/list_test.dart
+++ b/tests/lib_strong/collection/list_test.dart
@@ -31,13 +31,12 @@ class MyNoSuchMethodList<E> extends Object
MyNoSuchMethodList(List<E> this._list);
noSuchMethod(Invocation invocation) {
- if (invocation.memberName == #length) {
- if (invocation.isGetter) return _list.length;
- if (invocation.isSetter) {
- _list.length = invocation.positionalArguments.first;
- return null;
- }
- return super.noSuchMethod(invocation);
+ if (invocation.memberName == #length && invocation.isGetter) {
+ return _list.length;
+ }
+ if (invocation.memberName == new Symbol("length=") && invocation.isSetter) {
+ _list.length = invocation.positionalArguments.first;
+ return null;
}
if (invocation.memberName == new Symbol("[]") &&
invocation.positionalArguments.length == 1) {
@@ -60,13 +59,12 @@ class MyIndexableNoSuchMethod<E> {
MyIndexableNoSuchMethod(List<E> this._list);
noSuchMethod(Invocation invocation) {
- if (invocation.memberName == #length) {
- if (invocation.isGetter) return _list.length;
- if (invocation.isSetter) {
- _list.length = invocation.positionalArguments.first;
- return null;
- }
- return super.noSuchMethod(invocation);
+ if (invocation.memberName == #length && invocation.isGetter) {
+ return _list.length;
+ }
+ if (invocation.memberName == new Symbol("length=") && invocation.isSetter) {
+ _list.length = invocation.positionalArguments.first;
+ return null;
}
if (invocation.memberName == new Symbol("prototype")) {
return 42;

Powered by Google App Engine
This is Rietveld 408576698