mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-30 17:15:00 +01:00
Consume the components of the `impl` declaration, and set up scopes for the child elements. We don't yet build a representation for the impl itself. Also, add an interface type value. This is necessary so that we have a value for the expression on the right-hand side of `as` in an `impl`.
29 lines
755 B
Plaintext
29 lines
755 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
|
|
//
|
|
// AUTOUPDATE
|
|
|
|
interface Empty {
|
|
}
|
|
|
|
impl i32 as Empty {
|
|
}
|
|
|
|
// CHECK:STDOUT: --- empty.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %.1: type = interface_type @Empty [template]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace {.Empty = %Empty.decl} [template]
|
|
// CHECK:STDOUT: %Empty.decl = interface_decl @Empty, ()
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface @Empty {
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|