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

Unified Diff: pkg/analyzer/test/src/task/strong/checker_test.dart

Issue 1462133005: Downwards inference. This adds support to the resolver for downwards (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments 2 Created 5 years 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
Index: pkg/analyzer/test/src/task/strong/checker_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index 6e8ba4bee1012251af9f42847f878e59cef17ea2..dc4b9c44121d99c11f5f753a1e3f1056286d6d5a 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -32,10 +32,15 @@ void main() {
// it requires inference to work because of dartbug.com/23381
SplayTreeMap([int compare(K key1, K key2),
bool isValidKey(potentialKey)]) {
- : _comparator = /*warning:DownCastComposite*/(compare == null) ? Comparable.compare : compare,
- _validKey = /*info:InferredType should be pass*/(isValidKey != null) ? isValidKey : ((v) => true);
- _Predicate<Object> _v = /*warning:DownCastComposite*/(isValidKey != null) ? isValidKey : ((v) => true);
- _v = /*info:InferredType should be pass*/(isValidKey != null) ? _v : ((v) => true);
+ : _comparator = /*warning:DownCastComposite*/(compare == null)
+ ? Comparable.compare : compare,
+ _validKey = /*warning:DownCastComposite*/(isValidKey != null)
+ ? isValidKey : ((v) => true);
+ _Predicate<Object> _v = /*warning:DownCastComposite*/(isValidKey != null)
+ ? isValidKey : (/*info:InferredTypeClosure*/(v) => true);
+ // TODO(leafp): Fix unimplemented LUB in analyzer
+ _v = /*warning:DownCastComposite*/(isValidKey != null)
+ ? _v : (/*info:InferredTypeClosure*/(v) => true);
}
}
void main() {

Powered by Google App Engine
This is Rietveld 408576698