dc211c3f9d
Change-Id: If5ba12c571c77643e57669ef85f8235496d4b06b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117141 Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
20 lines
432 B
Dart
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 (_) {}
|
|
}
|