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

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

Issue 2990383002: Emit a hint when using generic method comment syntax (issue 30356) (Closed)
Patch Set: Created 3 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
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | pkg/analyzer/test/generated/strong_mode_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/static_type_warning_code_test.dart
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
index 86811cbcc8af35858bebd3faf04f2cfdb9f34269..8b0473c470314463235dfde9d181504197a33d85 100644
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
@@ -1107,10 +1107,10 @@ class Point<T extends num> {
}
main() {
- Point/*<T>*/ f/*<T extends num>*/(num/*=T*/ x, num/*=T*/ y) {
- return new Point/*<T>*/(x, y);
+ Point<T> f<T extends num>(T x, T y) {
+ return new Point<T>(x, y);
}
- print(f/*<String>*/('hello', 'world'));
+ print(f<String>('hello', 'world'));
}
''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
}
@@ -1123,13 +1123,13 @@ class Point<T extends num> {
}
class PointFactory {
- Point/*<T>*/ point/*<T extends num>*/(num/*=T*/ x, num/*=T*/ y) {
- return new Point/*<T>*/(x, y);
+ Point<T> point<T extends num>(T x, T y) {
+ return new Point<T>(x, y);
}
}
f(PointFactory factory) {
- print(factory.point/*<String>*/('hello', 'world'));
+ print(factory.point<String>('hello', 'world'));
}
''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
}
@@ -1141,12 +1141,12 @@ class Point<T extends num> {
Point(T x, T y);
}
-Point/*<T>*/ f/*<T extends num>*/(num/*=T*/ x, num/*=T*/ y) {
- return new Point/*<T>*/(x, y);
+Point<T> f<T extends num>(T x, T y) {
+ return new Point<T>(x, y);
}
main() {
- print(f/*<String>*/('hello', 'world'));
+ print(f<String>('hello', 'world'));
}
''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
}
@@ -2050,7 +2050,7 @@ class StrongModeStaticTypeWarningCodeTest extends ResolverTestCase {
Source source = addSource('''
f() {}
main() {
- f/*<int>*/();
+ f<int>();
}
''');
TestAnalysisResult analysisResult = await computeAnalysisResult(source);
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | pkg/analyzer/test/generated/strong_mode_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698