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

Side by Side Diff: pkg/analyzer/lib/task/model.dart

Issue 1897713002: Make analyzer more strong mode compliant (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 analyzer.task.model; 5 library analyzer.task.model;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:developer'; 8 import 'dart:developer';
9 9
10 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask; 10 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 if (inputs == null || !inputs.containsKey(name)) { 178 if (inputs == null || !inputs.containsKey(name)) {
179 return null; 179 return null;
180 } 180 }
181 return inputs[name]; 181 return inputs[name];
182 } 182 }
183 183
184 /** 184 /**
185 * Return the value of the input with the given [name]. Throw an exception if 185 * Return the value of the input with the given [name]. Throw an exception if
186 * the input value is not defined. 186 * the input value is not defined.
187 */ 187 */
188 Object getRequiredInput(String name) { 188 Object/*=E*/ getRequiredInput/*<E>*/(String name) {
189 if (inputs == null || !inputs.containsKey(name)) { 189 if (inputs == null || !inputs.containsKey(name)) {
190 throw new AnalysisException("Could not $description: missing $name"); 190 throw new AnalysisException("Could not $description: missing $name");
191 } 191 }
192 return inputs[name]; 192 return inputs[name] as Object/*=E*/;
193 } 193 }
194 194
195 /** 195 /**
196 * Return the source associated with the target. Throw an exception if 196 * Return the source associated with the target. Throw an exception if
197 * the target is not associated with a source. 197 * the target is not associated with a source.
198 */ 198 */
199 Source getRequiredSource() { 199 Source getRequiredSource() {
200 Source source = target.source; 200 Source source = target.source;
201 if (source == null) { 201 if (source == null) {
202 throw new AnalysisException("Could not $description: missing source"); 202 throw new AnalysisException("Could not $description: missing source");
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 /** 764 /**
765 * A work should be done, but without any special urgency. 765 * A work should be done, but without any special urgency.
766 */ 766 */
767 NORMAL, 767 NORMAL,
768 768
769 /** 769 /**
770 * Nothing to do. 770 * Nothing to do.
771 */ 771 */
772 NONE 772 NONE
773 } 773 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/test/generated/resolver_test_case.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698