Remove expectation that instantiated local function tearoffs are notEqual

This CL changes the test
language/generic_methods/explicit_instantiated_tearoff_test.dart
such that it no longer expects a generic instantiation of a local
function tearoff to be notEqual to another function object which is
the same local function, same enclosing invocation, same type
arguments.

The rationale is that we should not preclude an optimization whereby
these function objects are canonicalized (at run time, or if they
can be lifted to the top level even possibly at compile time).

Change-Id: I5845a19ce9ccf931c4d3abe4ab619f3ed2a2fbc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209860
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
diff --git a/tests/language/generic_methods/explicit_instantiated_tearoff_test.dart b/tests/language/generic_methods/explicit_instantiated_tearoff_test.dart
index 5813d60..8028216 100644
--- a/tests/language/generic_methods/explicit_instantiated_tearoff_test.dart
+++ b/tests/language/generic_methods/explicit_instantiated_tearoff_test.dart
@@ -65,12 +65,8 @@
       .expectStaticType<Exactly<int Function(String, [String?])>>();
     this.extInstanceMethod<int, String>
       .expectStaticType<Exactly<int Function(String, [String?])>>();
-
     Expect.identical(staticMethod<int, String>, staticTearOff);
-
-    // Extension instance methods are not equal unless identical.
-    Expect.notEquals(
-        extInstanceMethod<int, String>, this.extInstanceMethod<int, String>);
+    // Extension instance methods do not specify equality.
   }
 }
 
@@ -134,9 +130,7 @@
   Expect.equals(
       o.mixinInstanceMethod<int, String>, o.mixinInstanceMethod<int, String>);
 
-  // Instantiated extension methods are not equal unless they are identical.
-  Expect.notEquals(
-      o.extInstanceMethod<int, String>, o.extInstanceMethod<int, String>);
+  // Instantiated extension methods do not specify equality.
 
   // And not canonicalized where they shouldn't (different types).
   Expect.notEquals(toplevel<int, String>, toplevel<num, String>);
@@ -155,12 +149,10 @@
     Expect.equals(C.staticMethod<T, String>, C.staticMethod<T, String>);
     Expect.equals(M.staticMethod<T, String>, M.staticMethod<T, String>);
     Expect.equals(E.staticMethod<T, String>, E.staticMethod<T, String>);
-    Expect.notEquals(local<T, String>, local<T, String>);
     Expect.equals(toplevel<int, T>, toplevel<int, T>);
     Expect.equals(C.staticMethod<int, T>, C.staticMethod<int, T>);
     Expect.equals(M.staticMethod<int, T>, M.staticMethod<int, T>);
     Expect.equals(E.staticMethod<int, T>, E.staticMethod<int, T>);
-    Expect.notEquals(local<int, T>, local<int, T>);
   }<int>());
 
   o.tearOffsOnThis();