mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 13:20:12 +01:00
To make this work, introduce impl bindings into scope immediately when type-checking. We may rely on their existence before we finish type-checking the enclosing pattern.
18 lines
748 B
Plaintext
18 lines
748 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: %{not} %{executable_semantics} %s 2>&1 | \
|
|
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s
|
|
// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \
|
|
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s
|
|
// AUTOUPDATE: %{executable_semantics} %s
|
|
// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/impl/impl_as.carbon:14: expected constraint after `as`, found value of type i32
|
|
|
|
package ExecutableSemanticsTest api;
|
|
|
|
external impl i32 as i32 {}
|
|
|
|
fn Main() -> i32 {
|
|
}
|