mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-15 13:58:29 +00:00
Shorthand names are intended to be used in the textual format of references to instructions in another IR (which can't happen now, but will be possible in a forthcoming PR). The shorthand name uses the file name (minus the `.carbon` suffix) as a base, and if that base name is ambiguous within the compilation, it is given a numerical suffix `.N`, just like other textual IR names. Shorthand names are prefixed with `$` in the textual format, to distinguish them from inst and scope names. For example, a file `foo/bar.carbon` has the shorthand name `$bar`, and an instruction `@baz.%qux` in that file can be referenced from another file as `$bar.@baz.%qux`. This PR adds `toolchain/check/testdata/basics/file_name.carbon` to test this behavior. All other test changes are just applying this change to the existing textual SemIR dumps. --------- Co-authored-by: Dana Jansens <danakj@orodu.net>
1434 lines
95 KiB
Plaintext
1434 lines
95 KiB
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
|
|
//
|
|
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/patterns/struct.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/patterns/struct.carbon
|
|
|
|
// --- empty.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
let {} = {};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- literal.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
let {.a = b: ()} = {.a = ()};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- literal_two_fields.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
let {.a = b: i32, .c = d: bool} = {.a = 1, .c = true};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- literal_shorthand.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
let {a: ()} = {.a = ()};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- literal_shorthand_two_fields.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
let {a: i32, b: bool} = {.a = 1, .b = true};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- literal_mixed_syntax.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
let {.a = b: (), c: ()} = {.a = (), .c = ()};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- nested.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
let {.a = x: i32, .b = {.i = m: f32, .j = n: bool}} = {.a = 1, .b = {.i = 2.0, .j = true}};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- init_expr.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
fn F() -> {.a: i32, .b: bool};
|
|
|
|
//@dump-sem-ir-begin
|
|
let {.a = x: i32, .b = y: bool} = F();
|
|
//@dump-sem-ir-end
|
|
|
|
// --- init_expr_shorthand.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
fn F() -> {.a: i32, .b: bool};
|
|
|
|
//@dump-sem-ir-begin
|
|
let {a: i32, b: bool} = F();
|
|
//@dump-sem-ir-end
|
|
|
|
// --- ref_expr.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
var s: {.a: i32, .b: bool} = {.a = 1, .b = true};
|
|
|
|
//@dump-sem-ir-begin
|
|
let {.a = x: i32, .b = y: bool} = s;
|
|
//@dump-sem-ir-end
|
|
|
|
// --- ref_expr_shorthand.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
var s: {.a: i32, .b: bool} = {.a = 1, .b = true};
|
|
|
|
//@dump-sem-ir-begin
|
|
let {a: i32, b: bool} = s;
|
|
//@dump-sem-ir-end
|
|
|
|
// --- unordered.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
let {.a = b: i32, .c = d: bool} = {.c = true, .a = 1};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- unordered_shorthand.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
let {a: i32, b: bool} = {.b = true, .a = 1};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- unordered_mixed_syntax.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
let {a: i32, .b = c: bool} = {.b = true, .a = 1};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- fail_todo_underscore.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: ╭─┤ fail_todo_underscore.carbon:[[@LINE+7]]:19
|
|
// CHECK:STDERR: -> │ let {.a = x: i32, _} = {.a = 1, .b = ()};
|
|
// CHECK:STDERR: · ┳
|
|
// CHECK:STDERR: · ┗━━┫ error: semantics TODO: `Struct pattern underscore field`
|
|
// CHECK:STDERR: · ┃ [SemanticsTodo]
|
|
// CHECK:STDERR: ╰────
|
|
// CHECK:STDERR:
|
|
let {.a = x: i32, _} = {.a = 1, .b = ()};
|
|
let {.a = y: i32, _,} = {.a = 1, .b = ()};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- fail_no_matching_field.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: ╭─┤ fail_no_matching_field.carbon:[[@LINE+7]]:20
|
|
// CHECK:STDERR: -> │ let {.a = x: ()} = {.b = ()};
|
|
// CHECK:STDERR: · ━━━━┳━━━━
|
|
// CHECK:STDERR: · ┗━━┫ error: struct `{.a: ()}` has no field named `b`
|
|
// CHECK:STDERR: · ┃ [StructInitUnexpectedFieldInLiteral]
|
|
// CHECK:STDERR: ╰────
|
|
// CHECK:STDERR:
|
|
let {.a = x: ()} = {.b = ()};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- fail_no_matching_field_ref.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
var s: {.a: (), .b: ()} = {.a = (), .b = ()};
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: ╭─┤ fail_no_matching_field_ref.carbon:[[@LINE+9]]:20
|
|
// CHECK:STDERR: -> │ let {.c = x: ()} = s;
|
|
// CHECK:STDERR: · ┳
|
|
// CHECK:STDERR: · ┗━━┫ error: cannot convert from struct type
|
|
// CHECK:STDERR: · ┃ `{.a: (), .b: ()}` to `{.c: ()}`: unexpected
|
|
// CHECK:STDERR: · ┃ field `a` in source type
|
|
// CHECK:STDERR: · ┃ [StructInitUnexpectedFieldInConversion]
|
|
// CHECK:STDERR: ╰────
|
|
// CHECK:STDERR:
|
|
let {.c = x: ()} = s;
|
|
//@dump-sem-ir-end
|
|
|
|
|
|
// --- fail_unhandled_field.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: ╭─┤ fail_unhandled_field.carbon:[[@LINE+7]]:20
|
|
// CHECK:STDERR: -> │ let {.a = x: ()} = {.a = (), .b = true};
|
|
// CHECK:STDERR: · ━━━━━━━━━┳━━━━━━━━━━
|
|
// CHECK:STDERR: · ┗━━┫ error: struct `{.a: ()}` has no field named `b`
|
|
// CHECK:STDERR: · ┃ [StructInitUnexpectedFieldInLiteral]
|
|
// CHECK:STDERR: ╰────
|
|
// CHECK:STDERR:
|
|
let {.a = x: ()} = {.a = (), .b = true};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- fail_duplicate_field_name.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: ╭─┤ fail_duplicate_field_name.carbon:[[@LINE+8]]:19
|
|
// CHECK:STDERR: -> │ let {.a = b: (), .a = c: ()} = {.a = ()};
|
|
// CHECK:STDERR: · ┬ ┳
|
|
// CHECK:STDERR: · │ ┗━━┫ error: duplicated field name `a` in struct pattern
|
|
// CHECK:STDERR: · │ ┃ [StructNameDuplicate]
|
|
// CHECK:STDERR: · ╰────────────────┤ field with the same name here [StructNamePrevious]
|
|
// CHECK:STDERR: ╰────
|
|
// CHECK:STDERR:
|
|
let {.a = b: (), .a = c: ()} = {.a = ()};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- fail_duplicate_field_name_shorthand.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: ╭─┤ fail_duplicate_field_name_shorthand.carbon:[[@LINE+16]]:13
|
|
// CHECK:STDERR: -> │ let {a: (), a: ()} = {.a = ()};
|
|
// CHECK:STDERR: · ──┬── ┳
|
|
// CHECK:STDERR: · │ ┗━━┫ error: duplicate name `a` being declared in the same scope
|
|
// CHECK:STDERR: · │ ┃ [NameDeclDuplicate]
|
|
// CHECK:STDERR: · ╰─────────┤ name is previously declared here [NameDeclPrevious]
|
|
// CHECK:STDERR: ╰────
|
|
// CHECK:STDERR:
|
|
// CHECK:STDERR: ╭─┤ fail_duplicate_field_name_shorthand.carbon:[[@LINE+8]]:13
|
|
// CHECK:STDERR: -> │ let {a: (), a: ()} = {.a = ()};
|
|
// CHECK:STDERR: · ┬ ┳
|
|
// CHECK:STDERR: · │ ┗━━┫ error: duplicated field name `a` in struct pattern
|
|
// CHECK:STDERR: · │ ┃ [StructNameDuplicate]
|
|
// CHECK:STDERR: · ╰───────────┤ field with the same name here [StructNamePrevious]
|
|
// CHECK:STDERR: ╰────
|
|
// CHECK:STDERR:
|
|
let {a: (), a: ()} = {.a = ()};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- fail_duplicate_field_name_mixed_syntax.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: ╭─┤ fail_duplicate_field_name_mixed_syntax.carbon:[[@LINE+8]]:18
|
|
// CHECK:STDERR: -> │ let {.a = b: (), a: ()} = {.a = ()};
|
|
// CHECK:STDERR: · ┬ ┳
|
|
// CHECK:STDERR: · │ ┗━━┫ error: duplicated field name `a` in struct pattern
|
|
// CHECK:STDERR: · │ ┃ [StructNameDuplicate]
|
|
// CHECK:STDERR: · ╰───────────────┤ field with the same name here [StructNamePrevious]
|
|
// CHECK:STDERR: ╰────
|
|
// CHECK:STDERR:
|
|
let {.a = b: (), a: ()} = {.a = ()};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- fail_in_class_var.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class C {
|
|
// CHECK:STDERR: ╭─┤ fail_in_class_var.carbon:[[@LINE+7]]:7
|
|
// CHECK:STDERR: -> │ var {.a = x: ()};
|
|
// CHECK:STDERR: · ━━━━━━┳━━━━━
|
|
// CHECK:STDERR: · ┗━━┫ error: struct pattern in field declaration
|
|
// CHECK:STDERR: · ┃ [FieldWithStructPattern]
|
|
// CHECK:STDERR: ╰────
|
|
// CHECK:STDERR:
|
|
var {.a = x: ()};
|
|
}
|
|
|
|
// --- in_static_class_var.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class C {
|
|
//@dump-sem-ir-begin
|
|
static var {.a = x: ()};
|
|
//@dump-sem-ir-end
|
|
}
|
|
|
|
// --- in_class_let.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
class C {
|
|
//@dump-sem-ir-begin
|
|
let {.a = x: ()} = {.a = ()};
|
|
//@dump-sem-ir-end
|
|
}
|
|
|
|
// --- fail_incorrect_field_type.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: ╭─┤ fail_incorrect_field_type.carbon:[[@LINE+11]]:20
|
|
// CHECK:STDERR: -> │ let {.a = x: ()} = {.a = {}};
|
|
// CHECK:STDERR: · ┳━━━━━━━━
|
|
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of type `{}`
|
|
// CHECK:STDERR: · │ ┃ to `()`
|
|
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
|
// CHECK:STDERR: · ╰────┤ type `{}` does not implement interface
|
|
// CHECK:STDERR: · │ `Core.ImplicitAs(())`
|
|
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
|
// CHECK:STDERR: ╰────
|
|
// CHECK:STDERR:
|
|
let {.a = x: ()} = {.a = {}};
|
|
//@dump-sem-ir-end
|
|
|
|
// --- fail_incorrect_scrutinee_type.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: ╭─┤ fail_incorrect_scrutinee_type.carbon:[[@LINE+11]]:5
|
|
// CHECK:STDERR: -> │ let {.a = x: ()} = ((), ());
|
|
// CHECK:STDERR: · ┳━━━━━━━━━━━
|
|
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of type `((), ())` to
|
|
// CHECK:STDERR: · │ ┃ `{.a: ()}`
|
|
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
|
// CHECK:STDERR: · ╰────┤ type `((), ())` does not implement interface
|
|
// CHECK:STDERR: · │ `Core.ImplicitAs({.a: ()})`
|
|
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
|
// CHECK:STDERR: ╰────
|
|
// CHECK:STDERR:
|
|
let {.a = x: ()} = ((), ());
|
|
//@dump-sem-ir-end
|
|
|
|
// CHECK:STDOUT: --- empty.carbon = $empty
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %empty_struct_type [concrete]
|
|
// CHECK:STDOUT: %.931: %pattern_type = struct_pattern () [concrete]
|
|
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %.loc5: %pattern_type = struct_pattern () [concrete = constants.%.931]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %.loc5_11: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
|
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
|
// CHECK:STDOUT: %.loc5_6: %empty_struct_type = converted %.loc5_11, %empty_struct [concrete = constants.%empty_struct]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- literal.carbon = $literal
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.cb1 = value_binding_pattern b [concrete]
|
|
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.e85: type = pattern_type %struct_type.a [concrete]
|
|
// CHECK:STDOUT: %.140: %pattern_type.e85 = struct_pattern (%b.patt) [concrete]
|
|
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%empty_tuple) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.3 [concrete = constants.%empty_tuple.type] {
|
|
// CHECK:STDOUT: %.loc5_15.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_15.3: type = converted %.loc5_15.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, @__global_init.%.loc5_16.2
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.cb1 = value_binding_pattern b [concrete = constants.%b.patt]
|
|
// CHECK:STDOUT: %.loc5_16: %pattern_type.e85 = struct_pattern (%b.patt) [concrete = constants.%.140]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %.loc5_27: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_28.1: %struct_type.a = struct_literal (%.loc5_27) [concrete = constants.%struct]
|
|
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_28.2: %empty_tuple.type = converted %.loc5_27, %empty_tuple [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%.loc5_28.2) [concrete = constants.%struct]
|
|
// CHECK:STDOUT: %.loc5_16.1: %struct_type.a = converted %.loc5_28.1, %struct [concrete = constants.%struct]
|
|
// CHECK:STDOUT: %.loc5_16.2: %empty_tuple.type = struct_access %.loc5_16.1, element0 [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- literal_two_fields.carbon = $literal_two_fields
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
|
// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.d94 = value_binding_pattern b [concrete]
|
|
// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete]
|
|
// CHECK:STDOUT: %d.patt: %pattern_type.831 = value_binding_pattern d [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.c.11f: type = struct_type {.a: %i32, .c: bool} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.e6b: type = pattern_type %struct_type.a.c.11f [concrete]
|
|
// CHECK:STDOUT: %.d0e: %pattern_type.e6b = struct_pattern (%b.patt, %d.patt) [concrete]
|
|
// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.c.bbc: type = struct_type {.a: Core.IntLiteral, .c: bool} [concrete]
|
|
// CHECK:STDOUT: %struct.7e6: %struct_type.a.c.bbc = struct_value (%int_1.5b8, %true) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.type.6b0: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
|
|
// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness.d73: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.f53, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.6b0 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.d73) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete]
|
|
// CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
|
|
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
|
// CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete]
|
|
// CHECK:STDOUT: %struct.78d: %struct_type.a.c.11f = struct_value (%int_1.68a, %true) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)]
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
|
// CHECK:STDOUT: %b: %i32 = wrapper_binding b, @__global_init.%.loc5_31.2
|
|
// CHECK:STDOUT: %.loc5_27: type = type_literal bool [concrete = bool]
|
|
// CHECK:STDOUT: %d: bool = wrapper_binding d, @__global_init.%.loc5_31.3
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.d94 = value_binding_pattern b [concrete = constants.%b.patt]
|
|
// CHECK:STDOUT: %d.patt: %pattern_type.831 = value_binding_pattern d [concrete = constants.%d.patt]
|
|
// CHECK:STDOUT: %.loc5_31: %pattern_type.e6b = struct_pattern (%b.patt, %d.patt) [concrete = constants.%.d0e]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
|
// CHECK:STDOUT: %.loc5_53.1: %struct_type.a.c.bbc = struct_literal (%int_1, %true) [concrete = constants.%struct.7e6]
|
|
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
|
// CHECK:STDOUT: %bound_method.loc5_53.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
|
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
|
// CHECK:STDOUT: %bound_method.loc5_53.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_53.2(%int_1) [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_53.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_53.3: %i32 = converted %int_1, %.loc5_53.2 [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %struct: %struct_type.a.c.11f = struct_value (%.loc5_53.3, %true) [concrete = constants.%struct.78d]
|
|
// CHECK:STDOUT: %.loc5_31.1: %struct_type.a.c.11f = converted %.loc5_53.1, %struct [concrete = constants.%struct.78d]
|
|
// CHECK:STDOUT: %.loc5_31.2: %i32 = struct_access %.loc5_31.1, element0 [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_31.3: bool = struct_access %.loc5_31.1, element1 [concrete = constants.%true]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- literal_shorthand.carbon = $literal_shorthand
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.cb1 = value_binding_pattern a [concrete]
|
|
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.e85: type = pattern_type %struct_type.a [concrete]
|
|
// CHECK:STDOUT: %.e73: %pattern_type.e85 = struct_pattern (%a.patt) [concrete]
|
|
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%empty_tuple) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %.loc5_10.1: type = splice_block %.loc5_10.3 [concrete = constants.%empty_tuple.type] {
|
|
// CHECK:STDOUT: %.loc5_10.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_10.3: type = converted %.loc5_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, @__global_init.%.loc5_11.2
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.cb1 = value_binding_pattern a [concrete = constants.%a.patt]
|
|
// CHECK:STDOUT: %.loc5_11: %pattern_type.e85 = struct_pattern (%a.patt) [concrete = constants.%.e73]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %.loc5_22: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_23.1: %struct_type.a = struct_literal (%.loc5_22) [concrete = constants.%struct]
|
|
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_23.2: %empty_tuple.type = converted %.loc5_22, %empty_tuple [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%.loc5_23.2) [concrete = constants.%struct]
|
|
// CHECK:STDOUT: %.loc5_11.1: %struct_type.a = converted %.loc5_23.1, %struct [concrete = constants.%struct]
|
|
// CHECK:STDOUT: %.loc5_11.2: %empty_tuple.type = struct_access %.loc5_11.1, element0 [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- literal_shorthand_two_fields.carbon = $literal_shorthand_two_fields
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
|
// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete]
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete]
|
|
// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.b.214: type = struct_type {.a: %i32, .b: bool} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.269: type = pattern_type %struct_type.a.b.214 [concrete]
|
|
// CHECK:STDOUT: %.4eb: %pattern_type.269 = struct_pattern (%a.patt, %b.patt) [concrete]
|
|
// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.b.f6e: type = struct_type {.a: Core.IntLiteral, .b: bool} [concrete]
|
|
// CHECK:STDOUT: %struct.1e1: %struct_type.a.b.f6e = struct_value (%int_1.5b8, %true) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.type.6b0: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
|
|
// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness.d73: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.f53, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.6b0 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.d73) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete]
|
|
// CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
|
|
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
|
// CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete]
|
|
// CHECK:STDOUT: %struct.75c: %struct_type.a.b.214 = struct_value (%int_1.68a, %true) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)]
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
|
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, @__global_init.%.loc5_21.2
|
|
// CHECK:STDOUT: %.loc5_17: type = type_literal bool [concrete = bool]
|
|
// CHECK:STDOUT: %b: bool = wrapper_binding b, @__global_init.%.loc5_21.3
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete = constants.%a.patt]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete = constants.%b.patt]
|
|
// CHECK:STDOUT: %.loc5_21: %pattern_type.269 = struct_pattern (%a.patt, %b.patt) [concrete = constants.%.4eb]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
|
// CHECK:STDOUT: %.loc5_43.1: %struct_type.a.b.f6e = struct_literal (%int_1, %true) [concrete = constants.%struct.1e1]
|
|
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
|
// CHECK:STDOUT: %bound_method.loc5_43.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
|
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
|
// CHECK:STDOUT: %bound_method.loc5_43.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_43.2(%int_1) [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_43.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_43.3: %i32 = converted %int_1, %.loc5_43.2 [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %struct: %struct_type.a.b.214 = struct_value (%.loc5_43.3, %true) [concrete = constants.%struct.75c]
|
|
// CHECK:STDOUT: %.loc5_21.1: %struct_type.a.b.214 = converted %.loc5_43.1, %struct [concrete = constants.%struct.75c]
|
|
// CHECK:STDOUT: %.loc5_21.2: %i32 = struct_access %.loc5_21.1, element0 [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_21.3: bool = struct_access %.loc5_21.1, element1 [concrete = constants.%true]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- literal_mixed_syntax.carbon = $literal_mixed_syntax
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.cb1 = value_binding_pattern b [concrete]
|
|
// CHECK:STDOUT: %c.patt: %pattern_type.cb1 = value_binding_pattern c [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.c: type = struct_type {.a: %empty_tuple.type, .c: %empty_tuple.type} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.f10: type = pattern_type %struct_type.a.c [concrete]
|
|
// CHECK:STDOUT: %.fcd: %pattern_type.f10 = struct_pattern (%b.patt, %c.patt) [concrete]
|
|
// CHECK:STDOUT: %struct: %struct_type.a.c = struct_value (%empty_tuple, %empty_tuple) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.3 [concrete = constants.%empty_tuple.type] {
|
|
// CHECK:STDOUT: %.loc5_15.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_15.3: type = converted %.loc5_15.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, @__global_init.%.loc5_23.2
|
|
// CHECK:STDOUT: %.loc5_22.1: type = splice_block %.loc5_22.3 [concrete = constants.%empty_tuple.type] {
|
|
// CHECK:STDOUT: %.loc5_22.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_22.3: type = converted %.loc5_22.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %c: %empty_tuple.type = wrapper_binding c, @__global_init.%.loc5_23.3
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.cb1 = value_binding_pattern b [concrete = constants.%b.patt]
|
|
// CHECK:STDOUT: %c.patt: %pattern_type.cb1 = value_binding_pattern c [concrete = constants.%c.patt]
|
|
// CHECK:STDOUT: %.loc5_23: %pattern_type.f10 = struct_pattern (%b.patt, %c.patt) [concrete = constants.%.fcd]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %.loc5_34: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_43: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_44.1: %struct_type.a.c = struct_literal (%.loc5_34, %.loc5_43) [concrete = constants.%struct]
|
|
// CHECK:STDOUT: %empty_tuple.loc5_34: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_44.2: %empty_tuple.type = converted %.loc5_34, %empty_tuple.loc5_34 [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %empty_tuple.loc5_43: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_44.3: %empty_tuple.type = converted %.loc5_43, %empty_tuple.loc5_43 [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %struct: %struct_type.a.c = struct_value (%.loc5_44.2, %.loc5_44.3) [concrete = constants.%struct]
|
|
// CHECK:STDOUT: %.loc5_23.1: %struct_type.a.c = converted %.loc5_44.1, %struct [concrete = constants.%struct]
|
|
// CHECK:STDOUT: %.loc5_23.2: %empty_tuple.type = struct_access %.loc5_23.1, element0 [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_23.3: %empty_tuple.type = struct_access %.loc5_23.1, element1 [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- nested.carbon = $nested
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
|
// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete]
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.d94 = value_binding_pattern x [concrete]
|
|
// CHECK:STDOUT: %f32.3bc: type = class_type @Float, @Float(%int_32) [concrete]
|
|
// CHECK:STDOUT: %pattern_type.239: type = pattern_type %f32.3bc [concrete]
|
|
// CHECK:STDOUT: %m.patt: %pattern_type.239 = value_binding_pattern m [concrete]
|
|
// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete]
|
|
// CHECK:STDOUT: %n.patt: %pattern_type.831 = value_binding_pattern n [concrete]
|
|
// CHECK:STDOUT: %struct_type.i.j.e5d: type = struct_type {.i: %f32.3bc, .j: bool} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.0af: type = pattern_type %struct_type.i.j.e5d [concrete]
|
|
// CHECK:STDOUT: %.5ed: %pattern_type.0af = struct_pattern (%m.patt, %n.patt) [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.b.5f4: type = struct_type {.a: %i32, .b: %struct_type.i.j.e5d} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.04b: type = pattern_type %struct_type.a.b.5f4 [concrete]
|
|
// CHECK:STDOUT: %.cc7: %pattern_type.04b = struct_pattern (%x.patt, %.5ed) [concrete]
|
|
// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
|
|
// CHECK:STDOUT: %float.cce: Core.FloatLiteral = float_literal_value 20e-1 [concrete]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete]
|
|
// CHECK:STDOUT: %struct_type.i.j.e80: type = struct_type {.i: Core.FloatLiteral, .j: bool} [concrete]
|
|
// CHECK:STDOUT: %struct.050: %struct_type.i.j.e80 = struct_value (%float.cce, %true) [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.b.1a6: type = struct_type {.a: Core.IntLiteral, .b: %struct_type.i.j.e80} [concrete]
|
|
// CHECK:STDOUT: %struct.293: %struct_type.a.b.1a6 = struct_value (%int_1.5b8, %struct.050) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.type.6b0: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
|
|
// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness.d73: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.f53, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.facet.fc6: %ImplicitAs.type.6b0 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.d73) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet.fc6) [concrete]
|
|
// CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet.fc6 [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
|
|
// CHECK:STDOUT: %bound_method.3bd: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
|
// CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.type.6bb: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.3bc)> [concrete]
|
|
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%To) [symbolic]
|
|
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness.409: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.f2e, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.facet.253: %ImplicitAs.type.6bb = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.409) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.049: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%f32.3bc, %ImplicitAs.facet.253) [concrete]
|
|
// CHECK:STDOUT: %.f72: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.049, %ImplicitAs.facet.253 [concrete]
|
|
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.587: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.587 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.cce, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b [concrete]
|
|
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
|
|
// CHECK:STDOUT: %bound_method.6df: <bound method> = bound_method %float.cce, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
|
// CHECK:STDOUT: %float.b6c: %f32.3bc = float_value 2 [concrete]
|
|
// CHECK:STDOUT: %struct.3be: %struct_type.i.j.e5d = struct_value (%float.b6c, %true) [concrete]
|
|
// CHECK:STDOUT: %struct.431: %struct_type.a.b.5f4 = struct_value (%int_1.68a, %struct.3be) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)]
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
|
|
// CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/parts/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)]
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2e = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
|
// CHECK:STDOUT: %x: %i32 = wrapper_binding x, @__global_init.%.loc5_51.2
|
|
// CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
|
// CHECK:STDOUT: %m: %f32.3bc = wrapper_binding m, @__global_init.%.loc5_51.4
|
|
// CHECK:STDOUT: %.loc5_46: type = type_literal bool [concrete = bool]
|
|
// CHECK:STDOUT: %n: bool = wrapper_binding n, @__global_init.%.loc5_51.5
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.d94 = value_binding_pattern x [concrete = constants.%x.patt]
|
|
// CHECK:STDOUT: %m.patt: %pattern_type.239 = value_binding_pattern m [concrete = constants.%m.patt]
|
|
// CHECK:STDOUT: %n.patt: %pattern_type.831 = value_binding_pattern n [concrete = constants.%n.patt]
|
|
// CHECK:STDOUT: %.loc5_50: %pattern_type.0af = struct_pattern (%m.patt, %n.patt) [concrete = constants.%.5ed]
|
|
// CHECK:STDOUT: %.loc5_51: %pattern_type.04b = struct_pattern (%x.patt, %.loc5_50) [concrete = constants.%.cc7]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 20e-1 [concrete = constants.%float.cce]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
|
// CHECK:STDOUT: %.loc5_89.1: %struct_type.i.j.e80 = struct_literal (%float, %true) [concrete = constants.%struct.050]
|
|
// CHECK:STDOUT: %.loc5_90.1: %struct_type.a.b.1a6 = struct_literal (%int_1, %.loc5_89.1) [concrete = constants.%struct.293]
|
|
// CHECK:STDOUT: %impl.elem0.loc5_90: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
|
// CHECK:STDOUT: %bound_method.loc5_90.1: <bound method> = bound_method %int_1, %impl.elem0.loc5_90 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
|
// CHECK:STDOUT: %specific_fn.loc5_90: <specific function> = specific_function %impl.elem0.loc5_90, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
|
// CHECK:STDOUT: %bound_method.loc5_90.2: <bound method> = bound_method %int_1, %specific_fn.loc5_90 [concrete = constants.%bound_method.3bd]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_90.2(%int_1) [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_90.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_90.3: %i32 = converted %int_1, %.loc5_90.2 [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %impl.elem0.loc5_89: %.f72 = impl_witness_access constants.%ImplicitAs.impl_witness.409, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b]
|
|
// CHECK:STDOUT: %bound_method.loc5_89.1: <bound method> = bound_method %float, %impl.elem0.loc5_89 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
|
|
// CHECK:STDOUT: %specific_fn.loc5_89: <specific function> = specific_function %impl.elem0.loc5_89, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
|
// CHECK:STDOUT: %bound_method.loc5_89.2: <bound method> = bound_method %float, %specific_fn.loc5_89 [concrete = constants.%bound_method.6df]
|
|
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.3bc = call %bound_method.loc5_89.2(%float) [concrete = constants.%float.b6c]
|
|
// CHECK:STDOUT: %.loc5_89.2: %f32.3bc = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.b6c]
|
|
// CHECK:STDOUT: %.loc5_89.3: %f32.3bc = converted %float, %.loc5_89.2 [concrete = constants.%float.b6c]
|
|
// CHECK:STDOUT: %struct.loc5_89: %struct_type.i.j.e5d = struct_value (%.loc5_89.3, %true) [concrete = constants.%struct.3be]
|
|
// CHECK:STDOUT: %.loc5_90.4: %struct_type.i.j.e5d = converted %.loc5_89.1, %struct.loc5_89 [concrete = constants.%struct.3be]
|
|
// CHECK:STDOUT: %struct.loc5_90: %struct_type.a.b.5f4 = struct_value (%.loc5_90.3, %.loc5_90.4) [concrete = constants.%struct.431]
|
|
// CHECK:STDOUT: %.loc5_51.1: %struct_type.a.b.5f4 = converted %.loc5_90.1, %struct.loc5_90 [concrete = constants.%struct.431]
|
|
// CHECK:STDOUT: %.loc5_51.2: %i32 = struct_access %.loc5_51.1, element0 [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_51.3: %struct_type.i.j.e5d = struct_access %.loc5_51.1, element1 [concrete = constants.%struct.3be]
|
|
// CHECK:STDOUT: %.loc5_51.4: %f32.3bc = struct_access %.loc5_51.3, element0 [concrete = constants.%float.b6c]
|
|
// CHECK:STDOUT: %.loc5_51.5: bool = struct_access %.loc5_51.3, element1 [concrete = constants.%true]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- init_expr.carbon = $init_expr
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: bool} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.269: type = pattern_type %struct_type.a.b [concrete]
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete]
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.d94 = value_binding_pattern x [concrete]
|
|
// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete]
|
|
// CHECK:STDOUT: %y.patt: %pattern_type.831 = value_binding_pattern y [concrete]
|
|
// CHECK:STDOUT: %.e3b: %pattern_type.269 = struct_pattern (%x.patt, %y.patt) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
|
// CHECK:STDOUT: %.loc7_27: type = type_literal bool [concrete = bool]
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.d94 = value_binding_pattern x [concrete = constants.%x.patt]
|
|
// CHECK:STDOUT: %y.patt: %pattern_type.831 = value_binding_pattern y [concrete = constants.%y.patt]
|
|
// CHECK:STDOUT: %.loc7_31: %pattern_type.269 = struct_pattern (%x.patt, %y.patt) [concrete = constants.%.e3b]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
|
|
// CHECK:STDOUT: %.loc7_37.1: ref %struct_type.a.b = temporary_storage
|
|
// CHECK:STDOUT: %F.call: init %struct_type.a.b to %.loc7_37.1 = call %F.ref()
|
|
// CHECK:STDOUT: %.loc7_37.2: ref %struct_type.a.b = temporary %.loc7_37.1, %F.call
|
|
// CHECK:STDOUT: %.loc7_37.3: ref %i32 = struct_access %.loc7_37.2, element0
|
|
// CHECK:STDOUT: %.loc7_37.4: ref bool = struct_access %.loc7_37.2, element1
|
|
// CHECK:STDOUT: %.loc7_37.5: %i32 = acquire_value %.loc7_37.3
|
|
// CHECK:STDOUT: %x: %i32 = wrapper_binding x, %.loc7_37.5
|
|
// CHECK:STDOUT: %.loc7_37.6: bool = acquire_value %.loc7_37.4
|
|
// CHECK:STDOUT: %y: bool = wrapper_binding y, %.loc7_37.6
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- init_expr_shorthand.carbon = $init_expr_shorthand
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: bool} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.269: type = pattern_type %struct_type.a.b [concrete]
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete]
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete]
|
|
// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete]
|
|
// CHECK:STDOUT: %.4eb: %pattern_type.269 = struct_pattern (%a.patt, %b.patt) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
|
// CHECK:STDOUT: %.loc7_17: type = type_literal bool [concrete = bool]
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete = constants.%a.patt]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete = constants.%b.patt]
|
|
// CHECK:STDOUT: %.loc7_21: %pattern_type.269 = struct_pattern (%a.patt, %b.patt) [concrete = constants.%.4eb]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
|
|
// CHECK:STDOUT: %.loc7_27.1: ref %struct_type.a.b = temporary_storage
|
|
// CHECK:STDOUT: %F.call: init %struct_type.a.b to %.loc7_27.1 = call %F.ref()
|
|
// CHECK:STDOUT: %.loc7_27.2: ref %struct_type.a.b = temporary %.loc7_27.1, %F.call
|
|
// CHECK:STDOUT: %.loc7_27.3: ref %i32 = struct_access %.loc7_27.2, element0
|
|
// CHECK:STDOUT: %.loc7_27.4: ref bool = struct_access %.loc7_27.2, element1
|
|
// CHECK:STDOUT: %.loc7_27.5: %i32 = acquire_value %.loc7_27.3
|
|
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, %.loc7_27.5
|
|
// CHECK:STDOUT: %.loc7_27.6: bool = acquire_value %.loc7_27.4
|
|
// CHECK:STDOUT: %b: bool = wrapper_binding b, %.loc7_27.6
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- ref_expr.carbon = $ref_expr
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.b.214: type = struct_type {.a: %i32, .b: bool} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.269: type = pattern_type %struct_type.a.b.214 [concrete]
|
|
// CHECK:STDOUT: %.872: ref %i32 = struct_access file.%s.var, element0 [concrete]
|
|
// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete]
|
|
// CHECK:STDOUT: %.d8b: ref bool = struct_access file.%s.var, element1 [concrete]
|
|
// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete]
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.d94 = value_binding_pattern x [concrete]
|
|
// CHECK:STDOUT: %y.patt: %pattern_type.831 = value_binding_pattern y [concrete]
|
|
// CHECK:STDOUT: %.e3b: %pattern_type.269 = struct_pattern (%x.patt, %y.patt) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %i32.loc7: type = type_literal constants.%i32 [concrete = constants.%i32]
|
|
// CHECK:STDOUT: %.loc7_27: type = type_literal bool [concrete = bool]
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.d94 = value_binding_pattern x [concrete = constants.%x.patt]
|
|
// CHECK:STDOUT: %y.patt: %pattern_type.831 = value_binding_pattern y [concrete = constants.%y.patt]
|
|
// CHECK:STDOUT: %.loc7_31: %pattern_type.269 = struct_pattern (%x.patt, %y.patt) [concrete = constants.%.e3b]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: %s.ref: ref %struct_type.a.b.214 = name_ref s, file.%s [concrete = file.%s.var]
|
|
// CHECK:STDOUT: %.loc7_35.1: ref %i32 = struct_access %s.ref, element0 [concrete = constants.%.872]
|
|
// CHECK:STDOUT: %.loc7_35.2: ref bool = struct_access %s.ref, element1 [concrete = constants.%.d8b]
|
|
// CHECK:STDOUT: %.loc7_35.3: %i32 = acquire_value %.loc7_35.1
|
|
// CHECK:STDOUT: %x: %i32 = wrapper_binding x, %.loc7_35.3
|
|
// CHECK:STDOUT: %.loc7_35.4: bool = acquire_value %.loc7_35.2
|
|
// CHECK:STDOUT: %y: bool = wrapper_binding y, %.loc7_35.4
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- ref_expr_shorthand.carbon = $ref_expr_shorthand
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.b.214: type = struct_type {.a: %i32, .b: bool} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.269: type = pattern_type %struct_type.a.b.214 [concrete]
|
|
// CHECK:STDOUT: %.872: ref %i32 = struct_access file.%s.var, element0 [concrete]
|
|
// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete]
|
|
// CHECK:STDOUT: %.d8b: ref bool = struct_access file.%s.var, element1 [concrete]
|
|
// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete]
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete]
|
|
// CHECK:STDOUT: %.4eb: %pattern_type.269 = struct_pattern (%a.patt, %b.patt) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %i32.loc7: type = type_literal constants.%i32 [concrete = constants.%i32]
|
|
// CHECK:STDOUT: %.loc7_17: type = type_literal bool [concrete = bool]
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete = constants.%a.patt]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete = constants.%b.patt]
|
|
// CHECK:STDOUT: %.loc7_21: %pattern_type.269 = struct_pattern (%a.patt, %b.patt) [concrete = constants.%.4eb]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: %s.ref: ref %struct_type.a.b.214 = name_ref s, file.%s [concrete = file.%s.var]
|
|
// CHECK:STDOUT: %.loc7_25.1: ref %i32 = struct_access %s.ref, element0 [concrete = constants.%.872]
|
|
// CHECK:STDOUT: %.loc7_25.2: ref bool = struct_access %s.ref, element1 [concrete = constants.%.d8b]
|
|
// CHECK:STDOUT: %.loc7_25.3: %i32 = acquire_value %.loc7_25.1
|
|
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, %.loc7_25.3
|
|
// CHECK:STDOUT: %.loc7_25.4: bool = acquire_value %.loc7_25.2
|
|
// CHECK:STDOUT: %b: bool = wrapper_binding b, %.loc7_25.4
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- unordered.carbon = $unordered
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
|
// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.d94 = value_binding_pattern b [concrete]
|
|
// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete]
|
|
// CHECK:STDOUT: %d.patt: %pattern_type.831 = value_binding_pattern d [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.c: type = struct_type {.a: %i32, .c: bool} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.e6b: type = pattern_type %struct_type.a.c [concrete]
|
|
// CHECK:STDOUT: %.d0e: %pattern_type.e6b = struct_pattern (%b.patt, %d.patt) [concrete]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete]
|
|
// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
|
|
// CHECK:STDOUT: %struct_type.c.a: type = struct_type {.c: bool, .a: Core.IntLiteral} [concrete]
|
|
// CHECK:STDOUT: %struct.da6: %struct_type.c.a = struct_value (%true, %int_1.5b8) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.type.6b0: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
|
|
// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness.d73: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.f53, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.6b0 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.d73) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete]
|
|
// CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
|
|
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
|
// CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete]
|
|
// CHECK:STDOUT: %struct.78d: %struct_type.a.c = struct_value (%int_1.68a, %true) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)]
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
|
// CHECK:STDOUT: %b: %i32 = wrapper_binding b, @__global_init.%.loc5_31.2
|
|
// CHECK:STDOUT: %.loc5_27: type = type_literal bool [concrete = bool]
|
|
// CHECK:STDOUT: %d: bool = wrapper_binding d, @__global_init.%.loc5_31.3
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.d94 = value_binding_pattern b [concrete = constants.%b.patt]
|
|
// CHECK:STDOUT: %d.patt: %pattern_type.831 = value_binding_pattern d [concrete = constants.%d.patt]
|
|
// CHECK:STDOUT: %.loc5_31: %pattern_type.e6b = struct_pattern (%b.patt, %d.patt) [concrete = constants.%.d0e]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
|
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
// CHECK:STDOUT: %.loc5_53.1: %struct_type.c.a = struct_literal (%true, %int_1) [concrete = constants.%struct.da6]
|
|
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
|
// CHECK:STDOUT: %bound_method.loc5_53.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
|
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
|
// CHECK:STDOUT: %bound_method.loc5_53.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_53.2(%int_1) [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_53.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_53.3: %i32 = converted %int_1, %.loc5_53.2 [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %struct: %struct_type.a.c = struct_value (%.loc5_53.3, %true) [concrete = constants.%struct.78d]
|
|
// CHECK:STDOUT: %.loc5_31.1: %struct_type.a.c = converted %.loc5_53.1, %struct [concrete = constants.%struct.78d]
|
|
// CHECK:STDOUT: %.loc5_31.2: %i32 = struct_access %.loc5_31.1, element0 [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_31.3: bool = struct_access %.loc5_31.1, element1 [concrete = constants.%true]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- unordered_shorthand.carbon = $unordered_shorthand
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
|
// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete]
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete]
|
|
// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: bool} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.269: type = pattern_type %struct_type.a.b [concrete]
|
|
// CHECK:STDOUT: %.4eb: %pattern_type.269 = struct_pattern (%a.patt, %b.patt) [concrete]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete]
|
|
// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
|
|
// CHECK:STDOUT: %struct_type.b.a: type = struct_type {.b: bool, .a: Core.IntLiteral} [concrete]
|
|
// CHECK:STDOUT: %struct.a63: %struct_type.b.a = struct_value (%true, %int_1.5b8) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.type.6b0: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
|
|
// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness.d73: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.f53, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.6b0 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.d73) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete]
|
|
// CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
|
|
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
|
// CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete]
|
|
// CHECK:STDOUT: %struct.75c: %struct_type.a.b = struct_value (%int_1.68a, %true) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)]
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
|
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, @__global_init.%.loc5_21.2
|
|
// CHECK:STDOUT: %.loc5_17: type = type_literal bool [concrete = bool]
|
|
// CHECK:STDOUT: %b: bool = wrapper_binding b, @__global_init.%.loc5_21.3
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete = constants.%a.patt]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete = constants.%b.patt]
|
|
// CHECK:STDOUT: %.loc5_21: %pattern_type.269 = struct_pattern (%a.patt, %b.patt) [concrete = constants.%.4eb]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
|
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
// CHECK:STDOUT: %.loc5_43.1: %struct_type.b.a = struct_literal (%true, %int_1) [concrete = constants.%struct.a63]
|
|
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
|
// CHECK:STDOUT: %bound_method.loc5_43.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
|
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
|
// CHECK:STDOUT: %bound_method.loc5_43.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_43.2(%int_1) [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_43.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_43.3: %i32 = converted %int_1, %.loc5_43.2 [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %struct: %struct_type.a.b = struct_value (%.loc5_43.3, %true) [concrete = constants.%struct.75c]
|
|
// CHECK:STDOUT: %.loc5_21.1: %struct_type.a.b = converted %.loc5_43.1, %struct [concrete = constants.%struct.75c]
|
|
// CHECK:STDOUT: %.loc5_21.2: %i32 = struct_access %.loc5_21.1, element0 [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_21.3: bool = struct_access %.loc5_21.1, element1 [concrete = constants.%true]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- unordered_mixed_syntax.carbon = $unordered_mixed_syntax
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
|
// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete]
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete]
|
|
// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete]
|
|
// CHECK:STDOUT: %c.patt: %pattern_type.831 = value_binding_pattern c [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: bool} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.269: type = pattern_type %struct_type.a.b [concrete]
|
|
// CHECK:STDOUT: %.3b7: %pattern_type.269 = struct_pattern (%a.patt, %c.patt) [concrete]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete]
|
|
// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
|
|
// CHECK:STDOUT: %struct_type.b.a: type = struct_type {.b: bool, .a: Core.IntLiteral} [concrete]
|
|
// CHECK:STDOUT: %struct.a63: %struct_type.b.a = struct_value (%true, %int_1.5b8) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.type.6b0: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
|
|
// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness.d73: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.f53, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.6b0 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.d73) [concrete]
|
|
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete]
|
|
// CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
|
|
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
|
// CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete]
|
|
// CHECK:STDOUT: %struct.75c: %struct_type.a.b = struct_value (%int_1.68a, %true) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)]
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
|
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, @__global_init.%.loc5_26.2
|
|
// CHECK:STDOUT: %.loc5_22: type = type_literal bool [concrete = bool]
|
|
// CHECK:STDOUT: %c: bool = wrapper_binding c, @__global_init.%.loc5_26.3
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete = constants.%a.patt]
|
|
// CHECK:STDOUT: %c.patt: %pattern_type.831 = value_binding_pattern c [concrete = constants.%c.patt]
|
|
// CHECK:STDOUT: %.loc5_26: %pattern_type.269 = struct_pattern (%a.patt, %c.patt) [concrete = constants.%.3b7]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
|
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
// CHECK:STDOUT: %.loc5_48.1: %struct_type.b.a = struct_literal (%true, %int_1) [concrete = constants.%struct.a63]
|
|
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
|
// CHECK:STDOUT: %bound_method.loc5_48.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
|
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
|
// CHECK:STDOUT: %bound_method.loc5_48.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_48.2(%int_1) [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_48.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_48.3: %i32 = converted %int_1, %.loc5_48.2 [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %struct: %struct_type.a.b = struct_value (%.loc5_48.3, %true) [concrete = constants.%struct.75c]
|
|
// CHECK:STDOUT: %.loc5_26.1: %struct_type.a.b = converted %.loc5_48.1, %struct [concrete = constants.%struct.75c]
|
|
// CHECK:STDOUT: %.loc5_26.2: %i32 = struct_access %.loc5_26.1, element0 [concrete = constants.%int_1.68a]
|
|
// CHECK:STDOUT: %.loc5_26.3: bool = struct_access %.loc5_26.1, element1 [concrete = constants.%true]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_todo_underscore.carbon = $fail_todo_underscore
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_no_matching_field.carbon = $fail_no_matching_field
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete]
|
|
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.e85: type = pattern_type %struct_type.a [concrete]
|
|
// CHECK:STDOUT: %.298: %pattern_type.e85 = struct_pattern (%x.patt) [concrete]
|
|
// CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %empty_tuple.type} [concrete]
|
|
// CHECK:STDOUT: %struct: %struct_type.b = struct_value (%empty_tuple) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete = constants.%x.patt]
|
|
// CHECK:STDOUT: %.loc12: %pattern_type.e85 = struct_pattern (%x.patt) [concrete = constants.%.298]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %.loc12_27: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc12_28: %struct_type.b = struct_literal (%.loc12_27) [concrete = constants.%struct]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_no_matching_field_ref.carbon = $fail_no_matching_field_ref
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %empty_tuple.type, .b: %empty_tuple.type} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete]
|
|
// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %empty_tuple.type} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.810: type = pattern_type %struct_type.c [concrete]
|
|
// CHECK:STDOUT: %.9cb: %pattern_type.810 = struct_pattern (%x.patt) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete = constants.%x.patt]
|
|
// CHECK:STDOUT: %.loc14: %pattern_type.810 = struct_pattern (%x.patt) [concrete = constants.%.9cb]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: %s.ref: ref %struct_type.a.b = name_ref s, file.%s [concrete = file.%s.var]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_unhandled_field.carbon = $fail_unhandled_field
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete]
|
|
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.e85: type = pattern_type %struct_type.a [concrete]
|
|
// CHECK:STDOUT: %.298: %pattern_type.e85 = struct_pattern (%x.patt) [concrete]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %empty_tuple.type, .b: bool} [concrete]
|
|
// CHECK:STDOUT: %struct: %struct_type.a.b = struct_value (%empty_tuple, %true) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete = constants.%x.patt]
|
|
// CHECK:STDOUT: %.loc12: %pattern_type.e85 = struct_pattern (%x.patt) [concrete = constants.%.298]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %.loc12_27: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
|
// CHECK:STDOUT: %.loc12_39: %struct_type.a.b = struct_literal (%.loc12_27, %true) [concrete = constants.%struct]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_duplicate_field_name.carbon = $fail_duplicate_field_name
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %empty_tuple.type [concrete]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type = value_binding_pattern b [concrete]
|
|
// CHECK:STDOUT: %c.patt: %pattern_type = value_binding_pattern c [concrete]
|
|
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete]
|
|
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%empty_tuple) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %b.patt: %pattern_type = value_binding_pattern b [concrete = constants.%b.patt]
|
|
// CHECK:STDOUT: %c.patt: %pattern_type = value_binding_pattern c [concrete = constants.%c.patt]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %.loc13_39: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc13_40: %struct_type.a = struct_literal (%.loc13_39) [concrete = constants.%struct]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_duplicate_field_name_shorthand.carbon = $fail_duplicate_field_name_shorthand
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %empty_tuple.type [concrete]
|
|
// CHECK:STDOUT: %a.patt: %pattern_type = value_binding_pattern a [concrete]
|
|
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete]
|
|
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%empty_tuple) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %a.patt.loc21_7: %pattern_type = value_binding_pattern a [concrete = constants.%a.patt]
|
|
// CHECK:STDOUT: %a.patt.loc21_14: %pattern_type = value_binding_pattern a [concrete = constants.%a.patt]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %.loc21_29: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc21_30: %struct_type.a = struct_literal (%.loc21_29) [concrete = constants.%struct]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_duplicate_field_name_mixed_syntax.carbon = $fail_duplicate_field_name_mixed_syntax
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %empty_tuple.type [concrete]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type = value_binding_pattern b [concrete]
|
|
// CHECK:STDOUT: %a.patt: %pattern_type = value_binding_pattern a [concrete]
|
|
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete]
|
|
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%empty_tuple) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %b.patt: %pattern_type = value_binding_pattern b [concrete = constants.%b.patt]
|
|
// CHECK:STDOUT: %a.patt: %pattern_type = value_binding_pattern a [concrete = constants.%a.patt]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %.loc13_34: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc13_35: %struct_type.a = struct_literal (%.loc13_34) [concrete = constants.%struct]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- in_static_class_var.carbon = $in_static_class_var
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = ref_binding_pattern x [concrete]
|
|
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.e85: type = pattern_type %struct_type.a [concrete]
|
|
// CHECK:STDOUT: %.f83: %pattern_type.e85 = struct_pattern (%x.patt) [concrete]
|
|
// CHECK:STDOUT: %.var_patt: %pattern_type.e85 = var_pattern %.f83 [concrete]
|
|
// CHECK:STDOUT: %DefaultOrUnformed.type: type = facet_type <@DefaultOrUnformed> [concrete]
|
|
// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.type.5f6: type = fn_type @T.as.DefaultOrUnformed.impl.Op, @T.as.DefaultOrUnformed.impl(%T.67d) [symbolic]
|
|
// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.5c0: %T.as.DefaultOrUnformed.impl.Op.type.5f6 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %DefaultOrUnformed.impl_witness.037: <witness> = impl_witness imports.%DefaultOrUnformed.impl_witness_table.856, @T.as.DefaultOrUnformed.impl(%struct_type.a) [concrete]
|
|
// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %struct_type.a, (%DefaultOrUnformed.impl_witness.037) [concrete]
|
|
// CHECK:STDOUT: %.616: ref %empty_tuple.type = struct_access @C.%.var, element0 [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core.import_ref.002: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.5f6) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.5c0)]
|
|
// CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.002), @T.as.DefaultOrUnformed.impl [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class @C {
|
|
// CHECK:STDOUT: %.var: ref %struct_type.a = var_storage %.var_patt [concrete]
|
|
// CHECK:STDOUT: %.loc6_24.1: type = splice_block %.loc6_24.3 [concrete = constants.%empty_tuple.type] {
|
|
// CHECK:STDOUT: %.loc6_24.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc6_24.3: type = converted %.loc6_24.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %x: ref %empty_tuple.type = wrapper_binding x, @__global_init.%.loc6_10 [concrete = constants.%.616]
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = ref_binding_pattern x [concrete = constants.%x.patt]
|
|
// CHECK:STDOUT: %.loc6_25: %pattern_type.e85 = struct_pattern (%x.patt) [concrete = constants.%.f83]
|
|
// CHECK:STDOUT: %.var_patt: %pattern_type.e85 = var_pattern %.loc6_25 [concrete = constants.%.var_patt]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%C
|
|
// CHECK:STDOUT: .x = %x
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value constants.%struct_type.a, (constants.%DefaultOrUnformed.impl_witness.037) [concrete = constants.%DefaultOrUnformed.facet]
|
|
// CHECK:STDOUT: %.loc6_26.1: %DefaultOrUnformed.type = converted constants.%struct_type.a, %DefaultOrUnformed.facet [concrete = constants.%DefaultOrUnformed.facet]
|
|
// CHECK:STDOUT: %as_type: type = facet_access_type %.loc6_26.1 [concrete = constants.%struct_type.a]
|
|
// CHECK:STDOUT: %.loc6_26.2: type = converted %.loc6_26.1, %as_type [concrete = constants.%struct_type.a]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %struct_type.a = call %T.as.DefaultOrUnformed.impl.Op.specific_fn()
|
|
// CHECK:STDOUT: assign @C.%.var, %T.as.DefaultOrUnformed.impl.Op.call
|
|
// CHECK:STDOUT: %.loc6_10: ref %empty_tuple.type = struct_access @C.%.var, element0 [concrete = constants.%.616]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- in_class_let.carbon = $in_class_let
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete]
|
|
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.e85: type = pattern_type %struct_type.a [concrete]
|
|
// CHECK:STDOUT: %.972: %pattern_type.e85 = struct_pattern (%x.patt) [concrete]
|
|
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%empty_tuple) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class @C {
|
|
// CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.3 [concrete = constants.%empty_tuple.type] {
|
|
// CHECK:STDOUT: %.loc5_17.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_17.3: type = converted %.loc5_17.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, @__global_init.%.loc5_18.2
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete = constants.%x.patt]
|
|
// CHECK:STDOUT: %.loc5_18: %pattern_type.e85 = struct_pattern (%x.patt) [concrete = constants.%.972]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%C
|
|
// CHECK:STDOUT: .x = %x
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %.loc5_29: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_30.1: %struct_type.a = struct_literal (%.loc5_29) [concrete = constants.%struct]
|
|
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc5_30.2: %empty_tuple.type = converted %.loc5_29, %empty_tuple [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%.loc5_30.2) [concrete = constants.%struct]
|
|
// CHECK:STDOUT: %.loc5_18.1: %struct_type.a = converted %.loc5_30.1, %struct [concrete = constants.%struct]
|
|
// CHECK:STDOUT: %.loc5_18.2: %empty_tuple.type = struct_access %.loc5_18.1, element0 [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_incorrect_field_type.carbon = $fail_incorrect_field_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.715: type = struct_type {.a: %empty_tuple.type} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.e85: type = pattern_type %struct_type.a.715 [concrete]
|
|
// CHECK:STDOUT: %.298: %pattern_type.e85 = struct_pattern (%x.patt) [concrete]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %struct_type.a.225: type = struct_type {.a: %empty_struct_type} [concrete]
|
|
// CHECK:STDOUT: %struct: %struct_type.a.225 = struct_value (%empty_struct) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete = constants.%x.patt]
|
|
// CHECK:STDOUT: %.loc15: %pattern_type.e85 = struct_pattern (%x.patt) [concrete = constants.%.298]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %.loc15_27: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
|
// CHECK:STDOUT: %.loc15_28.1: %struct_type.a.225 = struct_literal (%.loc15_27) [concrete = constants.%struct]
|
|
// CHECK:STDOUT: %.loc15_28.2: %empty_tuple.type = converted %.loc15_27, <error> [concrete = <error>]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_incorrect_scrutinee_type.carbon = $fail_incorrect_scrutinee_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete]
|
|
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete]
|
|
// CHECK:STDOUT: %pattern_type.e85: type = pattern_type %struct_type.a [concrete]
|
|
// CHECK:STDOUT: %.298: %pattern_type.e85 = struct_pattern (%x.patt) [concrete]
|
|
// CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type, %empty_tuple.type) [concrete]
|
|
// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%empty_tuple, %empty_tuple) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete = constants.%x.patt]
|
|
// CHECK:STDOUT: %.loc15: %pattern_type.e85 = struct_pattern (%x.patt) [concrete = constants.%.298]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %.loc15_22: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc15_26: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc15_27: %tuple.type = tuple_literal (%.loc15_22, %.loc15_26) [concrete = constants.%tuple]
|
|
// CHECK:STDOUT: %.loc15_16: %struct_type.a = converted %.loc15_27, <error> [concrete = <error>]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|