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

Unified Diff: pkg/analyzer/test/generated/resolver_test.dart

Issue 1002893002: Cherry-pick r44410 and r44412 (Closed) Base URL: https://dart.googlecode.com/svn/trunk/dart
Patch Set: Created 5 years, 9 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/resolver_test.dart
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index ca1eb930ec7c5a1109969186f5c376d724dafad9..21bc357a92ec3d3e364ae28b89369fffb06b9ae8 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -12600,6 +12600,37 @@ f() {
expect(typeProvider.stringType.isSubtypeOf(t), isTrue);
}
+ void test_mutatedOutsideScope() {
+ // https://code.google.com/p/dart/issues/detail?id=22732
+ Source source = addSource(r'''
+class Base {
+}
+
+class Derived extends Base {
+ get y => null;
+}
+
+class C {
+ void f() {
+ Base x = null;
+ if (x is Derived) {
+ print(x.y); // BAD
+ }
+ x = null;
+ }
+}
+
+void g() {
+ Base x = null;
+ if (x is Derived) {
+ print(x.y); // GOOD
+ }
+ x = null;
+}''');
+ resolve(source);
+ assertNoErrors(source);
+ }
+
void test_objectMethodOnDynamicExpression_doubleEquals() {
// https://code.google.com/p/dart/issues/detail?id=20342
//
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698