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

Unified Diff: pkg/analyzer/lib/task/model.dart

Issue 1715563002: Tolerate SDKs that do not include dart:async (issue 25520) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Added test Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/src/context/mock_sdk.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/task/model.dart
diff --git a/pkg/analyzer/lib/task/model.dart b/pkg/analyzer/lib/task/model.dart
index 58e095bca1f413af86902aeedde3aebb2030d9d3..8144f17ee1e130b21c5c7abf9dc405018a05826c 100644
--- a/pkg/analyzer/lib/task/model.dart
+++ b/pkg/analyzer/lib/task/model.dart
@@ -171,6 +171,17 @@ abstract class AnalysisTask {
bool get handlesDependencyCycles => false;
/**
+ * Return the value of the input with the given [name], or `null` if the input
+ * value is not defined.
+ */
+ Object getOptionalInput(String name) {
+ if (inputs == null || !inputs.containsKey(name)) {
+ return null;
+ }
+ return inputs[name];
+ }
+
+ /**
* Return the value of the input with the given [name]. Throw an exception if
* the input value is not defined.
*/
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/src/context/mock_sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698