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

Unified Diff: pkg/analyzer/test/src/dart/element/element_test.dart

Issue 2647833002: fix #28008, fix #28009 implement FutureOr<T> (Closed)
Patch Set: add test Created 3 years, 11 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
Index: pkg/analyzer/test/src/dart/element/element_test.dart
diff --git a/pkg/analyzer/test/src/dart/element/element_test.dart b/pkg/analyzer/test/src/dart/element/element_test.dart
index 5c691e32c5e920c722fad008f15a6ce339eabdf9..5bc729587bfbe6d64b68ce085d834537c6230c33 100644
--- a/pkg/analyzer/test/src/dart/element/element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/element_test.dart
@@ -1819,8 +1819,8 @@ class FunctionTypeImplTest extends EngineTestCase {
// () -> B <: () -> A
ClassElement a = ElementFactory.classElement2("A");
ClassElement b = ElementFactory.classElement("B", a.type);
- FunctionType t = ElementFactory.functionElement2("t", a).type;
- FunctionType s = ElementFactory.functionElement2("s", b).type;
+ FunctionType t = ElementFactory.functionElement2("t", a.type).type;
+ FunctionType s = ElementFactory.functionElement2("s", b.type).type;
expect(t.isSubtypeOf(s), isTrue);
expect(s.isSubtypeOf(t), isTrue);
}
@@ -1828,10 +1828,10 @@ class FunctionTypeImplTest extends EngineTestCase {
void test_isSubtypeOf_returnType_tNotAssignableToS() {
// ! () -> A <: () -> B
FunctionType t = ElementFactory
- .functionElement2("t", ElementFactory.classElement2("A"))
+ .functionElement2("t", ElementFactory.classElement2("A").type)
.type;
FunctionType s = ElementFactory
- .functionElement2("s", ElementFactory.classElement2("B"))
+ .functionElement2("s", ElementFactory.classElement2("B").type)
.type;
expect(t.isSubtypeOf(s), isFalse);
}

Powered by Google App Engine
This is Rietveld 408576698