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

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

Issue 2647833002: fix #28008, fix #28009 implement FutureOr<T> (Closed)
Patch Set: Merge remote-tracking branch 'origin/master' into 28008_futureort 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 52f73f619da8e95b064d12346eea115b63fdb840..da65a63ec1bbc626dcc48bf1fa04adddec635057 100644
--- a/pkg/analyzer/test/src/dart/element/element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/element_test.dart
@@ -1820,8 +1820,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);
}
@@ -1829,10 +1829,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);
}
« no previous file with comments | « pkg/analyzer/test/src/context/mock_sdk.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_ast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698