[dart2js] Test for #45943

Bug: 45943
Change-Id: I5f4203f25cee80a1092c441c5061b8d0ad6bb1df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198720
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This commit is contained in:
Stephen Adams 2021-05-07 01:57:24 +00:00 committed by commit-bot@chromium.org
parent 9108f927ab
commit c65449b9fa
2 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,23 @@
// Copyright (c) 2021, 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 _InspectorOverlayLayer {
String selection;
_InspectorOverlayLayer(this.selection) {
bool inDebugMode = false;
assert(() {
inDebugMode = true;
return true;
}());
if (inDebugMode == false) {
throw Error();
}
}
}
main() {
_InspectorOverlayLayer('hello');
_InspectorOverlayLayer('hello');
}

View file

@ -0,0 +1,23 @@
// Copyright (c) 2021, 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 _InspectorOverlayLayer {
String selection;
_InspectorOverlayLayer(this.selection) {
bool inDebugMode = false;
assert(() {
inDebugMode = true;
return true;
}());
if (inDebugMode == false) {
throw Error();
}
}
}
main() {
_InspectorOverlayLayer('hello');
_InspectorOverlayLayer('hello');
}