mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:27:17 +00:00
1f848492b7
The Selector computed for InstanceGetterInvocation used the name of the getter eventhough the invocation is actually a .call invocation. This lead the computation of whether type arguments need to be parsed to fail because it queried with the wrong selector. Closes https://github.com/dart-lang/sdk/issues/48304 Change-Id: Ia08fb91fa24b5b04eba850f75f9b66cb89494dda Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234288 Reviewed-by: Mayank Patke <fishythefish@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
33 lines
737 B
Dart
33 lines
737 B
Dart
// Copyright (c) 2022, 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';
|
|
|
|
final String expected = '$A';
|
|
|
|
abstract class B {
|
|
call<T>();
|
|
}
|
|
|
|
class C implements B {
|
|
call<T>() => '$T';
|
|
}
|
|
|
|
abstract class A {}
|
|
|
|
class Wrapper {
|
|
Wrapper(this.b, this.call);
|
|
final B b;
|
|
final B call;
|
|
}
|
|
|
|
void main() {
|
|
B b = C();
|
|
Expect.equals(b<A>(), expected);
|
|
Expect.equals(Wrapper(b, b).b<A>(), expected);
|
|
Expect.equals((Wrapper(b, b).b)<A>(), expected);
|
|
Expect.equals(Wrapper(b, b).call<A>(), expected);
|
|
Expect.equals((Wrapper(b, b).call)<A>(), expected);
|
|
}
|