dart-sdk/tests/corelib/symbol_map_helper.dart
Johnni Winther 2d12821cba [test] Fix various static errors in corelib tests
Change-Id: I762538437b8f68f20c149b737cbe65f212c5c3b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142370
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-04-16 09:20:21 +00:00

16 lines
564 B
Dart

// Copyright (c) 2012, 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.
library dart.test.symbol_map_helper;
// TODO(ahe): Update map literals to avoid this method.
Map<Symbol, dynamic>? symbolToStringMap(Map<String, dynamic> map) {
if (map == null) return null;
Map<Symbol, dynamic> result = new Map<Symbol, dynamic>();
map.forEach((name, value) {
result[new Symbol(name)] = value;
});
return result;
}