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

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

Issue 1961993002: Make dart:math strong mode clean. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | sdk/lib/math/rectangle.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/math/point.dart
diff --git a/sdk/lib/math/point.dart b/sdk/lib/math/point.dart
index 42fcc469eb11de87d10b23764a042e52f1e330cf..01ce93c3b77387774708a0eb0eb25910b4f785a2 100644
--- a/sdk/lib/math/point.dart
+++ b/sdk/lib/math/point.dart
@@ -55,8 +55,9 @@ class Point<T extends num> {
* it, passing in a double [factor] on a `Point<int>` _causes_ _a_
* _runtime_ _error_ in checked mode.
*/
- Point<T> operator *(num factor) {
- return new Point<T>(x * factor, y * factor);
+ Point<T> operator *(num/*T|int*/ factor) {
+ return new Point<T>(
+ (x * factor) as dynamic/*=T*/, (y * factor) as dynamic/*=T*/);
}
/**
« no previous file with comments | « no previous file | sdk/lib/math/rectangle.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698