| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
| 9 * compiled. | 9 * compiled. |
| 10 */ | 10 */ |
| (...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 FunctionType computeFunctionType(Element element, | 1023 FunctionType computeFunctionType(Element element, |
| 1024 FunctionSignature signature) { | 1024 FunctionSignature signature) { |
| 1025 return withCurrentElement(element, | 1025 return withCurrentElement(element, |
| 1026 () => resolver.computeFunctionType(element, signature)); | 1026 () => resolver.computeFunctionType(element, signature)); |
| 1027 } | 1027 } |
| 1028 | 1028 |
| 1029 reportWarning(Node node, var message) { | 1029 reportWarning(Node node, var message) { |
| 1030 if (message is TypeWarning) { | 1030 if (message is TypeWarning) { |
| 1031 // TODO(ahe): Don't supress these warning when the type checker | 1031 // TODO(ahe): Don't supress these warning when the type checker |
| 1032 // is more complete. | 1032 // is more complete. |
| 1033 if (identical(message.message.kind, MessageKind.NOT_ASSIGNABLE)) return; | |
| 1034 if (identical(message.message.kind, MessageKind.MISSING_RETURN)) return; | 1033 if (identical(message.message.kind, MessageKind.MISSING_RETURN)) return; |
| 1035 if (identical(message.message.kind, MessageKind.MAYBE_MISSING_RETURN)) { | 1034 if (identical(message.message.kind, MessageKind.MAYBE_MISSING_RETURN)) { |
| 1036 return; | 1035 return; |
| 1037 } | 1036 } |
| 1038 } | 1037 } |
| 1039 SourceSpan span = spanFromNode(node); | 1038 SourceSpan span = spanFromNode(node); |
| 1040 | 1039 |
| 1041 reportDiagnostic(span, 'Warning: $message', api.Diagnostic.WARNING); | 1040 reportDiagnostic(span, 'Warning: $message', api.Diagnostic.WARNING); |
| 1042 } | 1041 } |
| 1043 | 1042 |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 | 1330 |
| 1332 void close() {} | 1331 void close() {} |
| 1333 | 1332 |
| 1334 toString() => name; | 1333 toString() => name; |
| 1335 | 1334 |
| 1336 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1335 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 1337 static NullSink outputProvider(String name, String extension) { | 1336 static NullSink outputProvider(String name, String extension) { |
| 1338 return new NullSink('$name.$extension'); | 1337 return new NullSink('$name.$extension'); |
| 1339 } | 1338 } |
| 1340 } | 1339 } |
| OLD | NEW |