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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java

Issue 252693006: Fix for 18468- T << Type where T is a type parameter and Type is the type Type from dart.core (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase and code review change Created 6 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 side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
index 18d9fdb22ea817ab29e23b7f1163f759b2448819..cdfba2884f3485c9f4fea5d3d948a1a1b8ca76b2 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
@@ -3417,6 +3417,22 @@ public class NonErrorResolverTest extends ResolverTestCase {
verify(source);
}
+ public void test_returnOfInvalidType_typeParameter_18468() throws Exception {
+ // This test verifies that T << Type where T is a type parameter and Type is the type Type from
+ // core, this particular test case comes from issue 18468 which depends on this fact.
+ //
+ // A test cannot be added to TypeParameterTypeImplTest since the types returned out of the
+ // TestTypeProvider don't have a mock 'dart.core' enclosing library element.
+ // See TypeParameterTypeImpl.isMoreSpecificThan().
+ Source source = addSource(createSource(//
+ "class Foo<T> {",
+ " Type get t => T;",
+ "}"));
+ resolve(source);
+ assertErrors(source);
+ verify(source);
+ }
+
public void test_returnOfInvalidType_void() throws Exception {
Source source = addSource(createSource(//
"void f1() {}",

Powered by Google App Engine
This is Rietveld 408576698