a1f193dcf4589332a9130b6551c1afa7fe79656a 430 B

12345678910111213141516
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // AUTOUPDATE
  6. package ExplorerTest;
  7. fn Main() -> i32 {
  8. var (x: i32, y: i32);
  9. // CHECK:STDERR: COMPILATION ERROR: fail_while_cond.carbon:[[@LINE+1]]: use of uninitialized variable x
  10. while (x == 0) {
  11. y = 1;
  12. }
  13. return 1;
  14. }