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

Unified Diff: runtime/lib/error.dart

Issue 9316100: Fix for issue 1307: throw runtime exception instead of reporting a compile time error if a static... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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 | « runtime/lib/error.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/error.dart
===================================================================
--- runtime/lib/error.dart (revision 3908)
+++ runtime/lib/error.dart (working copy)
@@ -58,3 +58,21 @@
String toString() => "InternalError: '${_msg}'";
final String _msg;
}
+
+
+class StaticResolutionException implements Exception {
+ factory StaticResolutionException._uninstantiable() {
+ throw const UnsupportedOperationException(
+ "StaticResolutionException can only be allocated by the VM");
+ }
+
+ String toString() => "Unresolved static method: url '$url' line $line " +
+ "pos $column\n$failedResolutionLine\n";
+
+ static _throwNew(int token_pos) native "StaticResolutionException_throwNew";
+
+ final String failedResolutionLine;
+ final String url;
+ final int line;
+ final int column;
+}
« no previous file with comments | « runtime/lib/error.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698