| Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
|
| index 79b11be0a9e43703497a6db482bc4d0088cf6906..37a8f3ee5bb3e354fe032b89348b0cc62fddcde4 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
|
| @@ -556,6 +556,37 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| + public void test_constMapKeyTypeImplementsEquals_direct() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " const A();",
|
| + " operator ==(other) => false;",
|
| + "}",
|
| + "main() {",
|
| + " const {const A() : 0};",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(source, CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS);
|
| + verify(source);
|
| + }
|
| +
|
| + public void test_constMapKeyTypeImplementsEquals_super() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " const A();",
|
| + " operator ==(other) => false;",
|
| + "}",
|
| + "class B extends A {",
|
| + " const B();",
|
| + "}",
|
| + "main() {",
|
| + " const {const B() : 0};",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(source, CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS);
|
| + verify(source);
|
| + }
|
| +
|
| public void test_constWithInvalidTypeParameters() throws Exception {
|
| Source source = addSource(createSource(//
|
| "class A {",
|
|
|