Files
sdk/pkg/front_end/testcases/general/compound_binary_implicit_as.dart
T
Johnni Winther c031e73df0 [cfe] Remove language version from testcases/general (Part 2 of ?)
This in preparation for enabling all bleeding edge experimental
features in testcases/general to get early feedback on how new features
affect existing code.

Change-Id: I1618e9b0401b3f3163c147e6a22c5895d4a5486e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234840
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-02 11:53:29 +00:00

22 lines
446 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.
// @dart=2.9
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 (_) {}
}