Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: pkg/dev_compiler/web/web_command.dart

Issue 2667753003: Shut up bad analyzer warning (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 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 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 @JS() 4 @JS()
5 library dev_compiler.web.web_command; 5 library dev_compiler.web.web_command;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:html' show HttpRequest; 9 import 'dart:html' show HttpRequest;
10 10
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 moduleCode = module 200 moduleCode = module
201 .getCode(ModuleFormat.legacy, unit.name, unit.name + '.map', 201 .getCode(ModuleFormat.legacy, unit.name, unit.name + '.map',
202 singleOutFile: true) 202 singleOutFile: true)
203 .code; 203 .code;
204 } 204 }
205 205
206 return new CompileResult( 206 return new CompileResult(
207 code: moduleCode, isValid: module.isValid, errors: module.errors); 207 code: moduleCode, isValid: module.isValid, errors: module.errors);
208 }; 208 };
209 209
210 return allowInterop(compileFn); 210 // TODO(vsm): Cast is due to https://github.com/dart-lang/sdk/issues/28507
211 return allowInterop(compileFn) as CompileModule;
211 } 212 }
212 } 213 }
213 214
214 // Given path, determine corresponding dart library. 215 // Given path, determine corresponding dart library.
215 String _moduleForLibrary(source) { 216 String _moduleForLibrary(source) {
216 if (source is InSummarySource) { 217 if (source is InSummarySource) {
217 return source.summaryPath.substring(1).replaceAll('.api.ds', ''); 218 return source.summaryPath.substring(1).replaceAll('.api.ds', '');
218 } 219 }
219 return source.toString().substring(1).replaceAll('.dart', ''); 220 return source.toString().substring(1).replaceAll('.dart', '');
220 } 221 }
221 222
222 /// Thrown when the input source code has errors. 223 /// Thrown when the input source code has errors.
223 class CompileErrorException implements Exception { 224 class CompileErrorException implements Exception {
224 toString() => '\nPlease fix all errors before compiling (warnings are okay).'; 225 toString() => '\nPlease fix all errors before compiling (warnings are okay).';
225 } 226 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698