mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 16:48:11 +00:00
- Added detection of unformed usage with `return var`, control-flow statements and member access. - Refactored the work flow: made flow facts a class and moved operations of flow facts into the class. - Added, cleaned and renamed test cases. Some test cases for the dynamic unformed check were suppressed by the static check. They are now added back. Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
19 lines
577 B
Plaintext
19 lines
577 B
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// RUN: %{explorer} %s 2>&1 | \
|
|
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s
|
|
// RUN: %{explorer} --parser_debug --trace_file=- %s 2>&1 | \
|
|
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s
|
|
// AUTOUPDATE: %{explorer} %s
|
|
// CHECK: result: 1
|
|
|
|
package ExplorerTest api;
|
|
|
|
fn Main() -> i32 {
|
|
var (x: i32, y: i32);
|
|
x = 1;
|
|
return x;
|
|
}
|