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

Unified Diff: pkg/analysis_server/test/analysis/get_hover_test.dart

Issue 2909943004: Write type parameters when writing members (issue 29714) (Closed)
Patch Set: Created 3 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 | « no previous file | pkg/analyzer/lib/src/dart/element/member.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/analysis/get_hover_test.dart
diff --git a/pkg/analysis_server/test/analysis/get_hover_test.dart b/pkg/analysis_server/test/analysis/get_hover_test.dart
index 80dfa9141a8c9499b1b469d834245a1ba48b6d4b..64cb212a4ea36417c36d7ec1061ef032bbd4daf3 100644
--- a/pkg/analysis_server/test/analysis/get_hover_test.dart
+++ b/pkg/analysis_server/test/analysis/get_hover_test.dart
@@ -283,6 +283,38 @@ main(A a) {
expect(hover.parameter, isNull);
}
+ test_expression_method_invocation_genericMethod() async {
+ addTestFile('''
+library my.library;
+
+abstract class Stream<T> {
+ Stream<S> transform<S>(StreamTransformer<T, S> streamTransformer);
+}
+abstract class StreamTransformer<T, S> {}
+
+f(Stream<int> s) {
+ s.transform(null);
+}
+''');
+ HoverInformation hover = await prepareHover('nsform(n');
+ // range
+ expect(hover.offset, findOffset('transform(n'));
+ expect(hover.length, 'transform'.length);
+ // element
+ expect(hover.containingLibraryName, 'my.library');
+ expect(hover.containingLibraryPath, testFile);
+ expect(hover.elementDescription,
+ 'Stream.transform<S>(StreamTransformer<int, S> streamTransformer) → Stream<S>');
+ expect(hover.elementKind, 'method');
+ expect(hover.isDeprecated, isFalse);
+ // types
+ expect(hover.staticType,
+ '(StreamTransformer<int, dynamic>) → Stream<dynamic>');
+ expect(hover.propagatedType, isNull);
+ // no parameter
+ expect(hover.parameter, isNull);
+ }
+
test_expression_parameter() async {
addTestFile('''
library my.library;
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/member.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698