blob: 5345fe2d3d72f10b63a980e2c11a7fcda8aa531b [file] [log] [blame]
/*
* 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.
*/
/**
* @assertion It's not a compile error to read definitely unassigned local
* variable in the form var x;
*
* @description Checks that it's not a compile error to read definitely
* unassigned local variable in the form var x;. Test indirect read via triple
* shift compound assignment
*
* @author sgrekhov@unipro.ru
*/
// SharedOptions=--enable-experiment=triple-shift
// Requirements=nnbd-weak
import '../../../../Utils/expect.dart';
main() {
var x;
try {
x >>>= 2;
Expect.fail("Exception expected");
} catch (_) {}
}