blob: a60b54e0f55e64f1d84dbaee8e904ef0c40c8bff [file] [log] [blame]
// Copyright (c) 2011, 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.
/// @assertion It is a compile-time error if the key of an entry in a constant
/// map literal is an instance of a class that implements the operator == unless
/// the key is a string or integer, a literal symbol or the result of invoking a
/// constant constructor of class Symbol.
/// @description Checks that compile-error is produced for const
/// Map<dynamic,dynamic> literal that contains a non-string, non-integer key
/// whose class implements operator ==.
/// @author ilya
class C {
const C();
bool operator ==(other) => true;
}
main() {
var x = const {const C(): 1};
// ^
// [analyzer] unspecified
// [cfe] unspecified
}