mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:27:17 +00:00
7130dd4d3d
This CL also adds fileUri/charOffset to all TypeBuilder's and renames Void/FutureOr/Never/Dynamic/BuiltInTypeBuilder to *TypeDeclarationBuilder so match their relation to TypeBuilder/TypeDeclarationBuilder. Closes #42962 Change-Id: Iee5102134574d24f748103282a37bb9a85a0ac2d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161165 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Jens Johansen <jensj@google.com>
21 lines
661 B
Dart
21 lines
661 B
Dart
// Copyright (c) 2018, 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.
|
|
|
|
class C {
|
|
operator []=(dynamic index, dynamic value) {}
|
|
}
|
|
|
|
abstract class I {
|
|
void operator []=(dynamic index, dynamic value) {}
|
|
}
|
|
|
|
class D extends C implements I {
|
|
// Even though `C` and `I` define different return types for `operator[]=`, it
|
|
// should still be possible to infer a return type here, since the return type
|
|
// of `operator[]=` is always inferred as `void`.
|
|
operator []=(dynamic index, dynamic value) {}
|
|
}
|
|
|
|
main() {}
|