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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
84 } | 84 } |
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 { |
jimhug
2011/10/27 17:45:11
This should be causing a validation error - you ca
Emily Fortuna
2011/10/27 17:59:04
This was left over when when I was testing the dar
| |
95 const FallThroughError() : super(); | 95 final String url; |
96 final int line; | |
97 | |
98 const FallThroughError(_url, _line) { | |
99 url = _url; | |
100 line = _line; | |
101 } | |
102 | |
103 String toString() { | |
104 return "Switch case fall-through in $url at line $line."; | |
105 } | |
96 } | 106 } |
97 | 107 |
98 // Dart core library. | 108 // Dart core library. |
99 | 109 |
100 class Object native "Object" { | 110 class Object native "Object" { |
101 | 111 |
102 const Object() native; | 112 const Object() native; |
103 | 113 |
104 bool operator ==(Object other) native; | 114 bool operator ==(Object other) native; |
105 String toString() native; | 115 String toString() native; |
106 | 116 |
107 // TODO(jmesserly): optimize this. No need to call it. | 117 // TODO(jmesserly): optimize this. No need to call it. |
108 get dynamic() => this; | 118 get dynamic() => this; |
109 } | 119 } |
OLD | NEW |