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

Unified Diff: pkg/analysis_server/test/services/correction/fix_test.dart

Issue 836413006: Issue 22027. When parameters has function type alias type, use its name. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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/lib/src/services/correction/util.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/correction/fix_test.dart
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index 794b2847db6d15c1ce4bb194a887e1e21a388e4a..ba3ceb046449015e0d54ebf1c86b01f7c84fd44f 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -769,7 +769,34 @@ main() {
''');
}
- void test_createMissingOverrides_functionType() {
+ void test_createMissingOverrides_functionTypeAlias() {
+ _indexTestUnit('''
+typedef int Binary(int left, int right);
+
+abstract class Emulator {
+ void performBinary(Binary binary);
+}
+
+class MyEmulator extends Emulator {
+}
+''');
+ assertHasFix(FixKind.CREATE_MISSING_OVERRIDES, '''
+typedef int Binary(int left, int right);
+
+abstract class Emulator {
+ void performBinary(Binary binary);
+}
+
+class MyEmulator extends Emulator {
+ @override
+ void performBinary(Binary binary) {
+ // TODO: implement performBinary
+ }
+}
+''');
+ }
+
+ void test_createMissingOverrides_functionTypedParameter() {
_indexTestUnit('''
abstract class A {
forEach(int f(double p1, String p2));
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/util.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698