mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:07:49 +00:00
cb52932c72
1. Add `Object` and `Map` to the very short list of names that are unminified in the app. 2. Tweak test to avoid testing minified name. Change-Id: Ide0cedc2950b5392eb6963403a48c0f89cd1b50a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332368 Commit-Queue: Stephen Adams <sra@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>
27 lines
759 B
Dart
27 lines
759 B
Dart
// Copyright (c) 2018, 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.
|
|
|
|
// dart2jsOptions=--strong
|
|
|
|
import 'package:expect/expect.dart';
|
|
|
|
class Foo<T extends num> {}
|
|
|
|
main() {
|
|
var a = new Foo();
|
|
var b = Foo;
|
|
Expect.equals(a.runtimeType, b);
|
|
|
|
var runtimeTypeToString = "${a.runtimeType}";
|
|
var typeLiteralToString = "${b}";
|
|
Expect.equals(runtimeTypeToString, typeLiteralToString);
|
|
|
|
if (!runtimeTypeToString.contains('minified:')) {
|
|
Expect.equals("Foo<num>", runtimeTypeToString);
|
|
Expect.equals("Foo<num>", typeLiteralToString);
|
|
}
|
|
print(runtimeTypeToString);
|
|
print(typeLiteralToString);
|
|
}
|