dart-sdk/tests/language/regress/regress45890_test.dart
Regis Crelier bde3097860 [vm/runtime] Consider instantiated type of instance method tear-offs in equality checks.
This fixes https://github.com/dart-lang/sdk/issues/45890

TEST=regression tests added

Change-Id: Id8d96e866e6da8ad848416a64967ed4fa0b29ce0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198101
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-05-05 00:07:52 +00:00

17 lines
421 B
Dart

// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import "package:expect/expect.dart";
class C {
T foo<T>(T value) => value;
}
void main() {
var c = C();
num Function(num) f0 = c.foo;
int Function(int) f1 = c.foo;
Expect.notEquals(f0, f1);
}