mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-29 07:44:57 +01:00
Handle identifier value category properly. (#986)
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
// RUN: %{executable_semantics} %s 2>&1 | \
|
||||
// RUN: %{not} %{executable_semantics} %s 2>&1 | \
|
||||
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s
|
||||
// RUN: %{executable_semantics} --trace %s 2>&1 | \
|
||||
// RUN: %{not} %{executable_semantics} --trace %s 2>&1 | \
|
||||
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s
|
||||
// AUTOUPDATE: %{executable_semantics} %s
|
||||
// CHECK: result: 0
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/basic_syntax/fail_assign_to_function.carbon:18: Cannot assign to rvalue 'F'
|
||||
|
||||
package ExecutableSemanticsTest api;
|
||||
|
||||
@@ -15,8 +15,6 @@ fn F() {}
|
||||
fn G() {}
|
||||
|
||||
fn Main() -> i32 {
|
||||
// TODO: this test should not pass. See comments on the handling of
|
||||
// IdentifierExpression in type_checker.cpp.
|
||||
F = G;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user