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

Unified Diff: pkg/analysis_server/test/services/refactoring/extract_method_test.dart

Issue 1161343002: Issue 23409. Don't set 'propagatedType' in (vs. after) 'name is Type'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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/analysis_server/pubspec.yaml ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/refactoring/extract_method_test.dart
diff --git a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
index f32a9ba1df3d9670be614dbbfb951b739ecb3ff8..5e376f3fd574384a8dbd560edc4550355be0f667 100644
--- a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
@@ -2384,6 +2384,39 @@ void res(int a) {
''');
}
+ test_statements_parameters_ignoreInnerPropagatedType() async {
+ indexTestUnit('''
+main(Object x) {
+// start
+ if (x is int) {
+ print('int');
+ }
+ if (x is bool) {
+ print('bool');
+ }
+// end
+}
+''');
+ _createRefactoringForStartEndComments();
+ // apply refactoring
+ return _assertSuccessfulRefactoring('''
+main(Object x) {
+// start
+ res(x);
+// end
+}
+
+void res(Object x) {
+ if (x is int) {
+ print('int');
+ }
+ if (x is bool) {
+ print('bool');
+ }
+}
+''');
+ }
+
test_statements_parameters_importType() {
_addLibraryReturningAsync();
indexTestUnit('''
« no previous file with comments | « pkg/analysis_server/pubspec.yaml ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698