d75a49a44f
Fixes https://github.com/dart-lang/sdk/issues/36515 Change-Id: I7e6717b8cde7341c482e5eeb52c2ab4fe8fdcb9c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98842 Commit-Queue: Aske Simon Christensen <askesc@google.com> Auto-Submit: Aske Simon Christensen <askesc@google.com> Reviewed-by: Kevin Millikin <kmillikin@google.com>
35 lines
634 B
Dart
35 lines
634 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.
|
|
|
|
// SharedOptions=--enable-experiment=constant-update-2018
|
|
|
|
class A {
|
|
bool operator ==(other);
|
|
const A();
|
|
}
|
|
|
|
class B implements A {
|
|
const B();
|
|
}
|
|
|
|
class C extends A {
|
|
const C();
|
|
}
|
|
|
|
class Invalid {
|
|
bool operator ==(other) => false;
|
|
const Invalid();
|
|
}
|
|
|
|
class D implements Invalid {
|
|
const D();
|
|
}
|
|
|
|
main() {
|
|
print(const {A(): 1});
|
|
print(const {B(): 2});
|
|
print(const {C(): 3});
|
|
print(const {D(): 4});
|
|
}
|