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

Unified Diff: sdk/lib/core/int.dart

Issue 1209523002: Make modInv throw Exception on incompatible operands. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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
Index: sdk/lib/core/int.dart
diff --git a/sdk/lib/core/int.dart b/sdk/lib/core/int.dart
index 58d80b84607f5eec6965c1030ef417f6f4cc6cd5..4bac632032baa1fed7516cdd5511107f2c9e7202 100644
--- a/sdk/lib/core/int.dart
+++ b/sdk/lib/core/int.dart
@@ -116,7 +116,7 @@ abstract class int extends num {
* modulo [modulus].
*
* The [modulus] must be positive.
- * Throws a RangeError if no modular inverse exists.
+ * Throws an [UnsupportedError] if no modular inverse exists.
regis 2015/06/24 15:40:43 It is an error if ...
Lasse Reichstein Nielsen 2015/06/25 07:22:21 As stated elsewhere, I think we might want to tell
regis 2015/06/25 16:51:45 It was my thinking in the first version, where I w
Lasse Reichstein Nielsen 2015/06/30 05:50:48 I can see that 0 can be seen as a valid answer. Af
*/
int modInverse(int modulus);

Powered by Google App Engine
This is Rietveld 408576698