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

Unified Diff: sdk/lib/math/math.dart

Issue 1462743002: add generic method comments to a few SDK methods (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
« sdk/lib/async/stream.dart ('K') | « sdk/lib/core/iterable.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/math/math.dart
diff --git a/sdk/lib/math/math.dart b/sdk/lib/math/math.dart
index d167d80f86a07823fbf6134be43ca104b04a090c..9182442863df32c0e739bf5d3077b6754672b254 100644
--- a/sdk/lib/math/math.dart
+++ b/sdk/lib/math/math.dart
@@ -63,7 +63,7 @@ const double SQRT2 = 1.4142135623730951;
* same mathematical value) then it is unspecified which of the two arguments
* is returned.
*/
-num min(num a, num b) {
+num/*=T*/ min/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) {
// These partially redundant type checks improve code quality for dart2js.
// Most of the improvement is at call sites from the inferred non-null num
// return type.
@@ -98,7 +98,7 @@ num min(num a, num b) {
* otherwise equal (including int and doubles with the same mathematical value)
* then it is unspecified which of the two arguments is returned.
*/
-num max(num a, num b) {
+num/*=T*/ max/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) {
// These partially redundant type checks improve code quality for dart2js.
// Most of the improvement is at call sites from the inferred non-null num
// return type.
« sdk/lib/async/stream.dart ('K') | « sdk/lib/core/iterable.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698