mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:21:07 +00:00
[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:
parent
9108f927ab
commit
c65449b9fa
23
tests/web/regress/45943_test.dart
Normal file
23
tests/web/regress/45943_test.dart
Normal 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');
|
||||
}
|
23
tests/web_2/regress/45943_test.dart
Normal file
23
tests/web_2/regress/45943_test.dart
Normal 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');
|
||||
}
|
Loading…
Reference in a new issue