Files
sdk/pkg/compiler/test/inlining/data/static_initializer.dart
T
Joshua Litt 20faaa5d94 [dart2js] Move dart2js unit tests to pkg/compiler/test.
Change-Id: Ib18f554c1076f27a3f7c0df5a36410da41a1f467
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148784
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-05-28 18:51:11 +00:00

53 lines
1.2 KiB
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.
// @dart = 2.7
/*member: main:[]*/
main() {
_var1;
_var2;
_var3;
}
var _var1 = <String>[_shortString(), _longStringMany()];
var _var2 = <String>[_shortString(), _longStringMany(), _longStringOnce()];
/*member: _shortString:[_var1,_var2]*/
String _shortString() => r"""
hello""";
/*member: _longStringMany:[]*/
String _longStringMany() => r"""
I wandered lonely as a cloud
That floats on high o'er vales and hills,
When all at once I saw a crowd,
A host, of golden daffodils;
Beside the lake, beneath the trees,
Fluttering and dancing in the breeze.
""";
/*member: _longStringOnce:[_var2]*/
String _longStringOnce() => r"""
Continuous as the stars that shine
And twinkle on the milky way,
They stretched in never-ending line
Along the margin of a bay:
Ten thousand saw I at a glance,
Tossing their heads in sprightly dance.
""";
var _var3 = <int>[Foo().a, (Foo()..a).a];
/*member: Foo.:[]*/
class Foo {
int z = 99;
/*member: Foo.a:[_var3]*/
get a => b;
/*member: Foo.b:[_var3]*/
get b => c;
/*member: Foo.c:[]*/
get c => z++;
}