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

Unified Diff: lib/runtime/_classes.js

Issue 1298893003: Enable is and as checks on non-ground types (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Minor fixes Created 5 years, 4 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 | lib/runtime/_errors.js » ('j') | lib/runtime/_operations.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/_classes.js
diff --git a/lib/runtime/_classes.js b/lib/runtime/_classes.js
index a57c30dde09e3074aa86de13289ce9f027068bc6..8d897240653dac711a8847da835c3f239b5ae748 100644
--- a/lib/runtime/_classes.js
+++ b/lib/runtime/_classes.js
@@ -24,7 +24,7 @@ dart_library.library('dart_runtime/_classes', null, /* Imports */[
const copyTheseProperties = dart_utils.copyTheseProperties;
const defineMemoizedGetter = dart_utils.defineMemoizedGetter;
const safeGetOwnProperty = dart_utils.safeGetOwnProperty;
- const throwError = dart_utils.throwError;
+ const throwInternalError = dart_utils.throwInternalError;
const defineProperty = Object.defineProperty;
const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
@@ -110,12 +110,12 @@ dart_library.library('dart_runtime/_classes', null, /* Imports */[
function generic(typeConstructor) {
let length = typeConstructor.length;
if (length < 1) {
- throwError('must have at least one generic type argument');
+ throwInternalError('must have at least one generic type argument');
}
let resultMap = new Map();
function makeGenericType(/*...arguments*/) {
if (arguments.length != length && arguments.length != 0) {
- throwError('requires ' + length + ' or 0 type arguments');
+ throwInternalError('requires ' + length + ' or 0 type arguments');
}
let args = slice.call(arguments);
while (args.length < length) args.push(types.dynamic);
@@ -124,7 +124,7 @@ dart_library.library('dart_runtime/_classes', null, /* Imports */[
for (let i = 0; i < length; i++) {
let arg = args[i];
if (arg == null) {
- throwError('type arguments should not be null: '
+ throwInternalError('type arguments should not be null: '
+ typeConstructor);
}
let map = value;
« no previous file with comments | « no previous file | lib/runtime/_errors.js » ('j') | lib/runtime/_operations.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698