| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 library dart.core._rasta_errors; |
| 5 |
| 6 // RastaK generates calls to these methods -- all backends must provide them |
| 7 // in their patch for "dart:core". |
| 8 // |
| 9 // In the future, we could have a single `rasta_errors.dart` for all backends to |
| 10 // ensure consistent error messages across all backends. |
| 11 // |
| 12 // But for now, we just want errors that are consistent with the VM, so these |
| 13 // methods just reuse what is in the VM. |
| 14 |
| 15 _unresolvedConstructorError( |
| 16 Object typeLiteral, |
| 17 String fullConstructorName, |
| 18 List arguments, |
| 19 Map<Symbol, dynamic> namedArguments, |
| 20 List existingArgumentNames) { |
| 21 return new NoSuchMethodError._withType( |
| 22 typeLiteral, |
| 23 fullConstructorName, |
| 24 _InvocationMirror._CONSTRUCTOR << _InvocationMirror._CALL_SHIFT, |
| 25 arguments, |
| 26 namedArguments, |
| 27 existingArgumentNames); |
| 28 } |
| 29 |
| 30 _malformedTypeError(String errorMessage) { |
| 31 return new _TypeError._create(null, null, null, errorMessage); |
| 32 } |
| OLD | NEW |