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

Unified Diff: compiler/lib/implementation/array.dart

Issue 8913006: Expands on previous function RTT to support named/optional parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Nits Created 9 years 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: compiler/lib/implementation/array.dart
diff --git a/compiler/lib/implementation/array.dart b/compiler/lib/implementation/array.dart
index 74f64e3d6784f7e0d1991061e8048f846106203e..0e3795a9a35094cd27c1e0cf53831e76be34698b 100644
--- a/compiler/lib/implementation/array.dart
+++ b/compiler/lib/implementation/array.dart
@@ -4,6 +4,9 @@
class ListFactory {
factory List<E>.from(Iterable<E> other) {
+ if (other == null) {
+ throw const NullPointerException();
+ }
List<E> list = new List<E>();
for (final e in other) {
list.add(e);
@@ -174,6 +177,9 @@ class ListImplementation<T> implements List<T> native "Array" {
throw const UnsupportedOperationException(
"Cannot add to a non-extendable list");
} else {
+ if (elements == null) {
+ throw const NullPointerException();
+ }
for (final e in elements) {
_add(e);
}
« no previous file with comments | « compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java ('k') | compiler/lib/implementation/rtt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698