32c3a2cde7
cfe_constant_test inlining_test jfield_analysis Change-Id: Ib2833507f4e19f3d6a1e5055977bccc962b2d791 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144494 Commit-Queue: Joshua Litt <joshualitt@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>
29 lines
1.3 KiB
Dart
29 lines
1.3 KiB
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.
|
|
|
|
const map0 = /*cfe.Map<dynamic,dynamic>()*/ {};
|
|
|
|
// TODO(johnniwinther): This seems like an odd offset for the constant. It
|
|
// should probably be at the start of the type arguments.
|
|
const map1 = <String, int> /*cfe.Map<String,int>()*/ {};
|
|
|
|
const Map<String, int> map2 = /*cfe.Map<String,int>()*/ {};
|
|
|
|
const map3 = /*cfe.Map<String,int>(String(foo):Int(42))*/ {'foo': 42};
|
|
|
|
const map4 = /*cfe.Map<String,int>(String(foo):Int(42),String(bar):Int(87))*/
|
|
{'foo': 42, 'bar': 87};
|
|
|
|
main() {
|
|
print(/*Map<dynamic,dynamic>()*/ map0);
|
|
print(
|
|
/*cfe|analyzer|dart2js.Map<String,int>()*/ /*dart2js:nnbd-sdk.Map<String*,int*>()*/ map1);
|
|
print(
|
|
/*cfe|analyzer|dart2js.Map<String,int>()*/ /*dart2js:nnbd-sdk.Map<String*,int*>()*/ map2);
|
|
print(
|
|
/*cfe|analyzer|dart2js.Map<String,int>(String(foo):Int(42))*/ /*dart2js:nnbd-sdk.Map<String*,int*>(String(foo):Int(42))*/ map3);
|
|
print(
|
|
/*cfe|analyzer|dart2js.Map<String,int>(String(foo):Int(42),String(bar):Int(87))*/ /*dart2js:nnbd-sdk.Map<String*,int*>(String(foo):Int(42),String(bar):Int(87))*/ map4);
|
|
}
|