Skip to content

Commit b56c3c0

Browse files
committed
Better example.
1 parent 96f1a82 commit b56c3c0

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

test/model_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
15171517

15181518
test('linked return type', () {
15191519
expect(t.linkedReturnType, equals('String'));
1520-
expect(generic.linkedReturnType, equals('List<T>'));
1520+
expect(generic.linkedReturnType, equals('List<S>'));
15211521
});
15221522

15231523
test("name with generics", () {

testing/test_package/lib/fake.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ typedef String FakeProcesses(String input);
135135
typedef T GenericTypedef<T>(T input);
136136

137137
/// A typedef with the new style generic function syntax.
138-
typedef NewGenericTypedef<T> = List<T> Function<T>(int);
138+
typedef NewGenericTypedef<T> = List<S> Function<S>(T, int, bool);
139139

140140
/// Lots and lots of parameters.
141141
typedef int LotsAndLotsOfParameters(so, many, parameters, it, should, wrap,

testing/test_package_docs/fake/NewGenericTypedef.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ <h5><a href="fake/fake-library.html">fake</a></h5>
146146
<div class="col-xs-12 col-sm-9 col-md-8 main-content">
147147

148148
<section class="multi-line-signature">
149-
<span class="returntype">List&lt;T&gt;</span>
150-
<span class="name ">NewGenericTypedef</span>(<wbr><span class="parameter" id="-param-"><span class="type-annotation">int</span></span>)
149+
<span class="returntype">List&lt;S&gt;</span>
150+
<span class="name ">NewGenericTypedef</span>(<wbr><span class="parameter" id="-param-"><span class="type-annotation">T</span>, </span> <span class="parameter" id="-param-"><span class="type-annotation">int</span>, </span> <span class="parameter" id="-param-"><span class="type-annotation">bool</span></span>)
151151
</section>
152152

153153
<section class="desc markdown">

testing/test_package_docs/fake/fake-library.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ <h2>Typedefs</h2>
296296

297297
</dd>
298298
<dt id="NewGenericTypedef" class="callable">
299-
<span class="name"><a href="fake/NewGenericTypedef.html">NewGenericTypedef</a></span><span class="signature">(<wbr><span class="parameter" id="-param-"><span class="type-annotation">int</span></span>)
300-
<span class="returntype parameter">&#8594; List&lt;T&gt;</span>
299+
<span class="name"><a href="fake/NewGenericTypedef.html">NewGenericTypedef</a></span><span class="signature">(<wbr><span class="parameter" id="-param-"><span class="type-annotation">T</span>, </span> <span class="parameter" id="-param-"><span class="type-annotation">int</span>, </span> <span class="parameter" id="-param-"><span class="type-annotation">bool</span></span>)
300+
<span class="returntype parameter">&#8594; List&lt;S&gt;</span>
301301
</span>
302302
</dt>
303303
<dd>

0 commit comments

Comments
 (0)