Files
sdk/pkg/front_end/testcases/general/compound_binary_implicit_as.dart
T
Johnni Winther dc211c3f9d [cfe] Refactoring handling of compound index set
Change-Id: If5ba12c571c77643e57669ef85f8235496d4b06b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117141
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-19 17:17:10 +00:00

20 lines
432 B
Dart

// Copyright (c) 2019, 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 A {}
class B extends A {
A operator +(B b) => new C();
}
class C extends A {}
main() {
Map<int, B> map = {0: new B()};
try {
map[0] += new B();
throw 'Expected type error';
} catch (_) {}
}