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

Unified Diff: pkg/analyzer/test/src/context/context_test.dart

Issue 2288223003: Don't perform final fields and top-level variables type propagation. (Closed)
Patch Set: Rewrite 'reuse' tests using 'inferredTypeSlot'. Created 4 years, 4 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: pkg/analyzer/test/src/context/context_test.dart
diff --git a/pkg/analyzer/test/src/context/context_test.dart b/pkg/analyzer/test/src/context/context_test.dart
index 42b91f85e78ca393d0269d2ddfe8e6fc783ab9ee..456d3ed53dcf8c867445b8b377c237e4370efbb5 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -2476,7 +2476,6 @@ class ClassTwo {
entry.setState(RESOLVED_UNIT10, CacheState.FLUSHED);
entry.setState(RESOLVED_UNIT11, CacheState.FLUSHED);
entry.setState(RESOLVED_UNIT12, CacheState.FLUSHED);
- entry.setState(RESOLVED_UNIT13, CacheState.FLUSHED);
entry.setState(RESOLVED_UNIT, CacheState.FLUSHED);
context.resolveCompilationUnit2(source, source);
@@ -3797,10 +3796,10 @@ main() {
{
Expression argument = find42();
expect(argument.staticParameterElement, isNull);
- expect(argument.propagatedParameterElement, isNotNull);
}
+
// Update a.dart: add type annotation for 'a'.
- // '42' has 'staticParameterElement', but not 'propagatedParameterElement'.
+ // '42' has 'staticParameterElement'.
context.setContents(
a,
r'''
@@ -3816,10 +3815,10 @@ main() {
{
Expression argument = find42();
expect(argument.staticParameterElement, isNotNull);
- expect(argument.propagatedParameterElement, isNull);
}
+
// Update a.dart: remove type annotation for 'a'.
- // '42' has 'propagatedParameterElement', but not 'staticParameterElement'.
+ // '42' doesn't have 'staticParameterElement'.
context.setContents(
a,
r'''
@@ -3835,7 +3834,6 @@ main() {
{
Expression argument = find42();
expect(argument.staticParameterElement, isNull);
- expect(argument.propagatedParameterElement, isNotNull);
}
}
« no previous file with comments | « pkg/analyzer/test/generated/resolver_test.dart ('k') | pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698