Files
sdk/tests/compiler/dart2js/sourcemaps/stacktrace/setter_inlining.dart
T
Johnni Winther 33bc628235 Treeshake unread fields
Change-Id: I188df5fd18163e5b32213a364d0fc163300db7b9
Reviewed-on: https://dart-review.googlesource.com/c/92130
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-07 09:58:19 +00:00

22 lines
513 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.
class MyClass {
int fieldName;
MyClass(this.fieldName);
set setterName(int v) => /*1:setterName(inlined)*/ fieldName = v;
}
@pragma('dart2js:noInline')
confuse(x) => x;
main() {
confuse(new MyClass(3));
var m = confuse(null);
m. /*0:main*/ setterName = 2;
print(m.fieldName);
}