| Index: pkg/compiler/lib/src/kernel/kernel.dart
|
| diff --git a/pkg/compiler/lib/src/kernel/kernel.dart b/pkg/compiler/lib/src/kernel/kernel.dart
|
| index 4e45653c41125ec58d0c7377daf73b4f5756562b..a7fd2ec95a1d935dc9d4e8d1f075fc5e41864376 100644
|
| --- a/pkg/compiler/lib/src/kernel/kernel.dart
|
| +++ b/pkg/compiler/lib/src/kernel/kernel.dart
|
| @@ -707,12 +707,15 @@ class Kernel {
|
| compiler.libraryLoader.lookupLibrary(Uris.dart_core);
|
| ClassElement cls = library.implementation.localLookup(className);
|
| cls.ensureResolved(compiler.resolution);
|
| - assert(invariant(CURRENT_ELEMENT_SPANNABLE, cls != null,
|
| - message: 'dart:core class $className not found.'));
|
| + assert(
|
| + cls != null,
|
| + failedAt(CURRENT_ELEMENT_SPANNABLE,
|
| + 'dart:core class $className not found.'));
|
| ConstructorElement constructor = cls.lookupConstructor(constructorName);
|
| - assert(invariant(CURRENT_ELEMENT_SPANNABLE, constructor != null,
|
| - message: "Constructor '$constructorName' not found "
|
| - "in class '$className'."));
|
| + assert(
|
| + constructor != null,
|
| + failedAt(CURRENT_ELEMENT_SPANNABLE,
|
| + "Constructor '$constructorName' not found in class '$className'."));
|
| compiler.resolution.ensureResolved(constructor);
|
| return functionToIr(constructor);
|
| }
|
| @@ -721,8 +724,10 @@ class Kernel {
|
| LibraryElement library =
|
| compiler.libraryLoader.lookupLibrary(Uris.dart_core);
|
| Element function = library.implementation.localLookup(name);
|
| - assert(invariant(CURRENT_ELEMENT_SPANNABLE, function != null,
|
| - message: "dart:core method '$name' not found."));
|
| + assert(
|
| + function != null,
|
| + failedAt(
|
| + CURRENT_ELEMENT_SPANNABLE, "dart:core method '$name' not found."));
|
| compiler.resolution.ensureResolved(function);
|
| return functionToIr(function);
|
| }
|
|
|