| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 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 file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #library("dart:core"); | 5 #library("dart:core"); |
| 6 #import("dart:coreimpl"); | 6 #import("dart:coreimpl"); |
| 7 | 7 |
| 8 #native("core.js"); | 8 #native("core.js"); |
| 9 | 9 |
| 10 // TODO(jimhug): Better way to map in standard corelib | 10 // TODO(jimhug): Better way to map in standard corelib |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 String toString() { | 85 String toString() { |
| 86 return "Failed type check: type $srcType is not assignable to type " + | 86 return "Failed type check: type $srcType is not assignable to type " + |
| 87 "$dstType of $dstName in $url at line " + | 87 "$dstType of $dstName in $url at line " + |
| 88 "$line, column $column."; | 88 "$line, column $column."; |
| 89 } | 89 } |
| 90 final String srcType; | 90 final String srcType; |
| 91 final String dstType; | 91 final String dstType; |
| 92 final String dstName; | 92 final String dstName; |
| 93 } | 93 } |
| 94 class FallThroughError { | 94 class FallThroughError { |
| 95 const FallThroughError() : super(); | 95 final String url; |
| 96 final int line; |
| 97 |
| 98 const FallThroughError(this.url, this.line); |
| 99 |
| 100 String toString() { |
| 101 return "Switch case fall-through in $url at line $line."; |
| 102 } |
| 96 } | 103 } |
| 97 | 104 |
| 98 // Dart core library. | 105 // Dart core library. |
| 99 | 106 |
| 100 class Object native "Object" { | 107 class Object native "Object" { |
| 101 | 108 |
| 102 const Object() native; | 109 const Object() native; |
| 103 | 110 |
| 104 bool operator ==(Object other) native; | 111 bool operator ==(Object other) native; |
| 105 String toString() native; | 112 String toString() native; |
| 106 | 113 |
| 107 // TODO(jmesserly): optimize this. No need to call it. | 114 // TODO(jmesserly): optimize this. No need to call it. |
| 108 get dynamic() => this; | 115 get dynamic() => this; |
| 109 } | 116 } |
| OLD | NEW |