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

Unified Diff: tests/compiler/dart2js/simple_inferrer_test.dart

Issue 17502003: Doing a call on a getter does not yield the return type of that getter. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/compiler/dart2js/simple_inferrer_test.dart
===================================================================
--- tests/compiler/dart2js/simple_inferrer_test.dart (revision 24244)
+++ tests/compiler/dart2js/simple_inferrer_test.dart (working copy)
@@ -364,6 +364,8 @@
return testReturnItselfOrInt(a);
}
+testReturnInvokeDynamicGetter() => new A().myFactory();
kasperl 2013/06/21 05:58:00 Extend test case with calling a field.
+
var topLevelConstList = const [42];
get topLevelGetter => 42;
@@ -385,6 +387,8 @@
operator[]= (index, value) {}
returnInt5() => ++this[0];
returnInt6() => this[0] += 1;
+
+ get myFactory => () => 42;
kasperl 2013/06/21 05:58:00 var myFactory2 = () => 87;
}
class B extends A {
@@ -473,6 +477,7 @@
testReturnElementOfConstList1();
testReturnElementOfConstList2();
testReturnItselfOrInt(topLevelGetter());
+ testReturnInvokeDynamicGetter();
}
""";
@@ -548,6 +553,7 @@
checkReturn('testReturnElementOfConstList1', typesInferrer.intType);
checkReturn('testReturnElementOfConstList2', typesInferrer.intType);
checkReturn('testReturnItselfOrInt', typesInferrer.intType);
+ checkReturn('testReturnInvokeDynamicGetter', typesInferrer.dynamicType);
checkReturnInClass(String className, String methodName, type) {
var cls = findElement(compiler, className);

Powered by Google App Engine
This is Rietveld 408576698