Files
carbon-lang/toolchain/check/testdata/pointer/import.carbon
T
Richard Smith bc395eb889 Represent integer literals as IntLiteral not as i32. (#4532)
When an `IntLiteral` appears as an operand of an `if` expression,
convert it to `i32` for now, so that we don't reject things like `if
cond then 1 else 2` due to having a non-constant value of type
`IntLiteral`.

For tuple indexing expressions such as `(a, b).0`, convert the index to
type `IntLiteral`, not to type `i32`. This isn't strictly necessary to
do in this PR, but avoids the need to provide an `IntLiteral` -> `i32`
implicit conversion for `no_prelude` tests using this syntax.
2024-11-15 23:24:15 +00:00

796 lines
43 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
//
// AUTOUPDATE
// TIP: To test this file alone, run:
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/pointer/import.carbon
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/pointer/import.carbon
// --- implicit.carbon
package Implicit;
var a_orig: i32 = 0;
var a_ref: i32* = &a_orig;
// --- implicit.impl.carbon
impl package Implicit;
var a: i32* = a_ref;
// CHECK:STDOUT: --- implicit.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 0 [template]
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(i32) [template]
// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.11 [template]
// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template]
// CHECK:STDOUT: %.25: <witness> = interface_witness (%Convert.15) [template]
// CHECK:STDOUT: %.26: <bound method> = bound_method %.1, %Convert.15 [template]
// CHECK:STDOUT: %.27: i32 = int_value 0 [template]
// CHECK:STDOUT: %.28: type = ptr_type i32 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
// CHECK:STDOUT: .Int32 = %import_ref.1
// CHECK:STDOUT: .ImplicitAs = %import_ref.2
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .Core = imports.%Core
// CHECK:STDOUT: .a_orig = %a_orig
// CHECK:STDOUT: .a_ref = %a_ref
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32]
// CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_32.loc4, %.loc4_13.1 [template = i32]
// CHECK:STDOUT: %a_orig.var: ref i32 = var a_orig
// CHECK:STDOUT: %a_orig: ref i32 = bind_name a_orig, %a_orig.var
// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32]
// CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_32.loc5, %.loc5_15.1 [template = i32]
// CHECK:STDOUT: %.loc5_15.3: type = ptr_type i32 [template = constants.%.28]
// CHECK:STDOUT: %a_ref.var: ref %.28 = var a_ref
// CHECK:STDOUT: %a_ref: ref %.28 = bind_name a_ref, %a_ref.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc4_19: Core.IntLiteral = int_value 0 [template = constants.%.1]
// CHECK:STDOUT: %.loc4_20.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.15]
// CHECK:STDOUT: %.loc4_20.2: <bound method> = bound_method %.loc4_19, %.loc4_20.1 [template = constants.%.26]
// CHECK:STDOUT: %int.convert_checked: init i32 = call %.loc4_20.2(%.loc4_19) [template = constants.%.27]
// CHECK:STDOUT: %.loc4_20.3: init i32 = converted %.loc4_19, %int.convert_checked [template = constants.%.27]
// CHECK:STDOUT: assign file.%a_orig.var, %.loc4_20.3
// CHECK:STDOUT: %a_orig.ref: ref i32 = name_ref a_orig, file.%a_orig
// CHECK:STDOUT: %.loc5: %.28 = addr_of %a_orig.ref
// CHECK:STDOUT: assign file.%a_ref.var, %.loc5
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- implicit.impl.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
// CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(i32)> [template]
// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic]
// CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.9 [symbolic]
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(i32) [template]
// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template]
// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.10 [template]
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
// CHECK:STDOUT: %.5: type = int_type signed, %N [symbolic]
// CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%.5)> [symbolic]
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2, @impl.2(%N) [symbolic]
// CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic]
// CHECK:STDOUT: %.6: <witness> = interface_witness (%Convert.3) [symbolic]
// CHECK:STDOUT: %.7: type = int_type unsigned, %N [symbolic]
// CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(%.7)> [symbolic]
// CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3, @impl.3(%N) [symbolic]
// CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic]
// CHECK:STDOUT: %.8: <witness> = interface_witness (%Convert.4) [symbolic]
// CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template]
// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
// CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template]
// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.5 [template]
// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.20 [template]
// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.4, @impl.5(%N) [symbolic]
// CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic]
// CHECK:STDOUT: %.11: <witness> = interface_witness (%Convert.6) [symbolic]
// CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.5, @impl.6(%N) [symbolic]
// CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic]
// CHECK:STDOUT: %.12: <witness> = interface_witness (%Convert.7) [symbolic]
// CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
// CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(i32)> [template]
// CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.6, @As(%Dest) [symbolic]
// CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic]
// CHECK:STDOUT: %.13: type = assoc_entity_type %As.type.2, %Convert.type.8 [symbolic]
// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.33 [symbolic]
// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.6, @As(i32) [template]
// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template]
// CHECK:STDOUT: %.15: type = assoc_entity_type %As.type.3, %Convert.type.9 [template]
// CHECK:STDOUT: %.16: %.15 = assoc_entity element0, imports.%import_ref.34 [template]
// CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%.5)> [symbolic]
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.7, @impl.8(%N) [symbolic]
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic]
// CHECK:STDOUT: %.17: <witness> = interface_witness (%Convert.10) [symbolic]
// CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(%.7)> [symbolic]
// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.8, @impl.9(%N) [symbolic]
// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [symbolic]
// CHECK:STDOUT: %.18: <witness> = interface_witness (%Convert.11) [symbolic]
// CHECK:STDOUT: %As.type.6: type = facet_type <@As, @As(Core.IntLiteral)> [template]
// CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.6, @As(Core.IntLiteral) [template]
// CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template]
// CHECK:STDOUT: %.19: type = assoc_entity_type %As.type.6, %Convert.type.12 [template]
// CHECK:STDOUT: %.20: %.19 = assoc_entity element0, imports.%import_ref.44 [template]
// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.9, @impl.11(%N) [symbolic]
// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [symbolic]
// CHECK:STDOUT: %.21: <witness> = interface_witness (%Convert.13) [symbolic]
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.10, @impl.12(%N) [symbolic]
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [symbolic]
// CHECK:STDOUT: %.22: <witness> = interface_witness (%Convert.14) [symbolic]
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %.23: type = ptr_type i32 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+15, unloaded
// CHECK:STDOUT: %import_ref.2: ref %.23 = import_ref Implicit//default, inst+388, loaded
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
// CHECK:STDOUT: .Int32 = %import_ref.51
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.3 = import_ref Implicit//default, inst+30, unloaded
// CHECK:STDOUT: %import_ref.4 = import_ref Implicit//default, inst+31, unloaded
// CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+32, unloaded
// CHECK:STDOUT: %import_ref.6: type = import_ref Implicit//default, inst+66, loaded [template = Core.IntLiteral]
// CHECK:STDOUT: %import_ref.7: type = import_ref Implicit//default, inst+67, loaded [template = constants.%ImplicitAs.type.3]
// CHECK:STDOUT: %import_ref.8 = import_ref Implicit//default, inst+68, unloaded
// CHECK:STDOUT: %import_ref.9 = import_ref Implicit//default, inst+47, unloaded
// CHECK:STDOUT: %import_ref.11: type = import_ref Implicit//default, inst+78, loaded [template = Core.IntLiteral]
// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+79, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
// CHECK:STDOUT: %import_ref.13 = import_ref Implicit//default, inst+80, unloaded
// CHECK:STDOUT: %import_ref.14: type = import_ref Implicit//default, inst+108, loaded [template = Core.IntLiteral]
// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+109, loaded [symbolic = @impl.3.%ImplicitAs.type (constants.%ImplicitAs.type.5)]
// CHECK:STDOUT: %import_ref.16 = import_ref Implicit//default, inst+110, unloaded
// CHECK:STDOUT: %import_ref.17: type = import_ref Implicit//default, inst+133, loaded [template = i32]
// CHECK:STDOUT: %import_ref.18: type = import_ref Implicit//default, inst+134, loaded [template = constants.%ImplicitAs.type.6]
// CHECK:STDOUT: %import_ref.19 = import_ref Implicit//default, inst+135, unloaded
// CHECK:STDOUT: %import_ref.21: type = import_ref Implicit//default, inst+146, loaded [symbolic = @impl.5.%.1 (constants.%.5)]
// CHECK:STDOUT: %import_ref.22: type = import_ref Implicit//default, inst+147, loaded [template = constants.%ImplicitAs.type.6]
// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+148, unloaded
// CHECK:STDOUT: %import_ref.24: type = import_ref Implicit//default, inst+173, loaded [symbolic = @impl.6.%.1 (constants.%.7)]
// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+174, loaded [template = constants.%ImplicitAs.type.6]
// CHECK:STDOUT: %import_ref.26 = import_ref Implicit//default, inst+175, unloaded
// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+205, unloaded
// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+206, unloaded
// CHECK:STDOUT: %import_ref.29 = import_ref Implicit//default, inst+207, unloaded
// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+209, loaded [template = Core.IntLiteral]
// CHECK:STDOUT: %import_ref.31: type = import_ref Implicit//default, inst+210, loaded [template = constants.%As.type.3]
// CHECK:STDOUT: %import_ref.32 = import_ref Implicit//default, inst+211, unloaded
// CHECK:STDOUT: %import_ref.33 = import_ref Implicit//default, inst+226, unloaded
// CHECK:STDOUT: %import_ref.35: type = import_ref Implicit//default, inst+248, loaded [template = Core.IntLiteral]
// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+249, loaded [symbolic = @impl.8.%As.type (constants.%As.type.4)]
// CHECK:STDOUT: %import_ref.37 = import_ref Implicit//default, inst+250, unloaded
// CHECK:STDOUT: %import_ref.38: type = import_ref Implicit//default, inst+277, loaded [template = Core.IntLiteral]
// CHECK:STDOUT: %import_ref.39: type = import_ref Implicit//default, inst+278, loaded [symbolic = @impl.9.%As.type (constants.%As.type.5)]
// CHECK:STDOUT: %import_ref.40 = import_ref Implicit//default, inst+279, unloaded
// CHECK:STDOUT: %import_ref.41: type = import_ref Implicit//default, inst+302, loaded [template = i32]
// CHECK:STDOUT: %import_ref.42: type = import_ref Implicit//default, inst+303, loaded [template = constants.%As.type.6]
// CHECK:STDOUT: %import_ref.43 = import_ref Implicit//default, inst+304, unloaded
// CHECK:STDOUT: %import_ref.45: type = import_ref Implicit//default, inst+315, loaded [symbolic = @impl.11.%.1 (constants.%.5)]
// CHECK:STDOUT: %import_ref.46: type = import_ref Implicit//default, inst+316, loaded [template = constants.%As.type.6]
// CHECK:STDOUT: %import_ref.47 = import_ref Implicit//default, inst+317, unloaded
// CHECK:STDOUT: %import_ref.48: type = import_ref Implicit//default, inst+342, loaded [symbolic = @impl.12.%.1 (constants.%.7)]
// CHECK:STDOUT: %import_ref.49: type = import_ref Implicit//default, inst+343, loaded [template = constants.%As.type.6]
// CHECK:STDOUT: %import_ref.50 = import_ref Implicit//default, inst+344, unloaded
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .a_orig = imports.%import_ref.1
// CHECK:STDOUT: .a_ref = imports.%import_ref.2
// CHECK:STDOUT: .Core = imports.%Core
// CHECK:STDOUT: .a = %a
// CHECK:STDOUT: }
// CHECK:STDOUT: %Implicit.import = import Implicit
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32, %.loc4_11.1 [template = i32]
// CHECK:STDOUT: %.loc4_11.3: type = ptr_type i32 [template = constants.%.23]
// CHECK:STDOUT: %a.var: ref %.23 = var a
// CHECK:STDOUT: %a: ref %.23 = bind_name a, %a.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)]
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.9 [symbolic = %.2 (constants.%.2)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%import_ref.3
// CHECK:STDOUT: .Convert = imports.%import_ref.4
// CHECK:STDOUT: witness = (imports.%import_ref.5)
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic interface @As(constants.%Dest: type) {
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.8)]
// CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)]
// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.8) [symbolic = %.1 (constants.%.13)]
// CHECK:STDOUT: %.2: @As.%.1 (%.13) = assoc_entity element0, imports.%import_ref.33 [symbolic = %.2 (constants.%.14)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%import_ref.27
// CHECK:STDOUT: .Convert = imports.%import_ref.28
// CHECK:STDOUT: witness = (imports.%import_ref.29)
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @impl.1: imports.%import_ref.6 as imports.%import_ref.7 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%import_ref.8
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @impl.2(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.4)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)]
// CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)]
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.6)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: imports.%import_ref.11 as imports.%import_ref.12 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%import_ref.13
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @impl.3(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.5)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)]
// CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)]
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.8)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: imports.%import_ref.14 as imports.%import_ref.15 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%import_ref.16
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @impl.4: imports.%import_ref.17 as imports.%import_ref.18 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%import_ref.19
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @impl.5(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.6)]
// CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)]
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.11)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: imports.%import_ref.21 as imports.%import_ref.22 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%import_ref.23
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @impl.6(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.7)]
// CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)]
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.12)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: imports.%import_ref.24 as imports.%import_ref.25 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%import_ref.26
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @impl.7: imports.%import_ref.30 as imports.%import_ref.31 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%import_ref.32
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @impl.8(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%.1)> [symbolic = %As.type (constants.%As.type.4)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.10)]
// CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)]
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.17)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: imports.%import_ref.35 as imports.%import_ref.36 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%import_ref.37
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @impl.9(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%.1)> [symbolic = %As.type (constants.%As.type.5)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.9(%N) [symbolic = %Convert.type (constants.%Convert.type.11)]
// CHECK:STDOUT: %Convert: @impl.9.%Convert.type (%Convert.type.11) = struct_value () [symbolic = %Convert (constants.%Convert.11)]
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.18)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: imports.%import_ref.38 as imports.%import_ref.39 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%import_ref.40
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @impl.10: imports.%import_ref.41 as imports.%import_ref.42 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%import_ref.43
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @impl.11(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.11(%N) [symbolic = %Convert.type (constants.%Convert.type.13)]
// CHECK:STDOUT: %Convert: @impl.11.%Convert.type (%Convert.type.13) = struct_value () [symbolic = %Convert (constants.%Convert.13)]
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.21)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: imports.%import_ref.45 as imports.%import_ref.46 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%import_ref.47
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @impl.12(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.12(%N) [symbolic = %Convert.type (constants.%Convert.type.14)]
// CHECK:STDOUT: %Convert: @impl.12.%Convert.type (%Convert.type.14) = struct_value () [symbolic = %Convert (constants.%Convert.14)]
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.22)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: imports.%import_ref.48 as imports.%import_ref.49 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%import_ref.50
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) {
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.2.%.1 (%.5) = "int.convert_checked";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Convert.3(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.3.%.1 (%.7) = "int.convert_checked";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Convert.4(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn[%self.param_patt: @Convert.4.%.1 (%.5)]() -> Core.IntLiteral = "int.convert_checked";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Convert.5(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn[%self.param_patt: @Convert.5.%.1 (%.7)]() -> Core.IntLiteral = "int.convert_checked";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Convert.6(constants.%Dest: type, constants.%Self.3: @As.%As.type (%As.type.2)) {
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.7.%.1 (%.5) = "int.convert_checked";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Convert.8(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.8.%.1 (%.7) = "int.convert_checked";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Convert.9(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn[%self.param_patt: @Convert.9.%.1 (%.5)]() -> Core.IntLiteral = "int.convert_checked";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Convert.10(constants.%N: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%.1 (%.7)]() -> Core.IntLiteral = "int.convert_checked";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %a_ref.ref: ref %.23 = name_ref a_ref, imports.%import_ref.2
// CHECK:STDOUT: %.loc4: %.23 = bind_value %a_ref.ref
// CHECK:STDOUT: assign file.%a.var, %.loc4
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
// CHECK:STDOUT: %Dest => constants.%Dest
// CHECK:STDOUT: %Dest.patt => constants.%Dest
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @ImplicitAs(i32) {
// CHECK:STDOUT: %Dest => i32
// CHECK:STDOUT: %Dest.patt => i32
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
// CHECK:STDOUT: %Self => constants.%Self.2
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.2
// CHECK:STDOUT: %Convert => constants.%Convert.2
// CHECK:STDOUT: %.1 => constants.%.3
// CHECK:STDOUT: %.2 => constants.%.4
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @ImplicitAs(%Dest) {
// CHECK:STDOUT: %Dest => constants.%Dest
// CHECK:STDOUT: %Dest.patt => constants.%Dest
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%Dest) {
// CHECK:STDOUT: %Dest => constants.%Dest
// CHECK:STDOUT: %Dest.patt => constants.%Dest
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.1) {
// CHECK:STDOUT: %Dest => constants.%Dest
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2
// CHECK:STDOUT: %Self => constants.%Self.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @ImplicitAs(constants.%.5) {
// CHECK:STDOUT: %Dest => constants.%.5
// CHECK:STDOUT: %Dest.patt => constants.%.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @ImplicitAs(@impl.2.%.1) {
// CHECK:STDOUT: %Dest => constants.%.5
// CHECK:STDOUT: %Dest.patt => constants.%.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.2(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.5
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.2(%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.5
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Convert.2(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %.1 => constants.%.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @ImplicitAs(constants.%.7) {
// CHECK:STDOUT: %Dest => constants.%.7
// CHECK:STDOUT: %Dest.patt => constants.%.7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @ImplicitAs(@impl.3.%.1) {
// CHECK:STDOUT: %Dest => constants.%.7
// CHECK:STDOUT: %Dest.patt => constants.%.7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.3(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.7
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.3(%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.7
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Convert.3(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %.1 => constants.%.7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
// CHECK:STDOUT: %Dest => Core.IntLiteral
// CHECK:STDOUT: %Dest.patt => Core.IntLiteral
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6
// CHECK:STDOUT: %Self => constants.%Self.2
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.5
// CHECK:STDOUT: %Convert => constants.%Convert.5
// CHECK:STDOUT: %.1 => constants.%.9
// CHECK:STDOUT: %.2 => constants.%.10
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.5(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.5(%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Convert.4(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %.1 => constants.%.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.6(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.6(%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Convert.5(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %.1 => constants.%.7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @As(constants.%Dest) {
// CHECK:STDOUT: %Dest => constants.%Dest
// CHECK:STDOUT: %Dest.patt => constants.%Dest
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @As(i32) {
// CHECK:STDOUT: %Dest => i32
// CHECK:STDOUT: %Dest.patt => i32
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %As.type => constants.%As.type.3
// CHECK:STDOUT: %Self => constants.%Self.4
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.9
// CHECK:STDOUT: %Convert => constants.%Convert.9
// CHECK:STDOUT: %.1 => constants.%.15
// CHECK:STDOUT: %.2 => constants.%.16
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @As(%Dest) {
// CHECK:STDOUT: %Dest => constants.%Dest
// CHECK:STDOUT: %Dest.patt => constants.%Dest
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @As(@Convert.6.%Dest) {
// CHECK:STDOUT: %Dest => constants.%Dest
// CHECK:STDOUT: %Dest.patt => constants.%Dest
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Convert.6(constants.%Dest, constants.%Self.3) {
// CHECK:STDOUT: %Dest => constants.%Dest
// CHECK:STDOUT: %As.type => constants.%As.type.2
// CHECK:STDOUT: %Self => constants.%Self.3
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @As(constants.%.5) {
// CHECK:STDOUT: %Dest => constants.%.5
// CHECK:STDOUT: %Dest.patt => constants.%.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @As(@impl.8.%.1) {
// CHECK:STDOUT: %Dest => constants.%.5
// CHECK:STDOUT: %Dest.patt => constants.%.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.8(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.5
// CHECK:STDOUT: %As.type => constants.%As.type.4
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.8(%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.5
// CHECK:STDOUT: %As.type => constants.%As.type.4
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Convert.7(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %.1 => constants.%.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @As(constants.%.7) {
// CHECK:STDOUT: %Dest => constants.%.7
// CHECK:STDOUT: %Dest.patt => constants.%.7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @As(@impl.9.%.1) {
// CHECK:STDOUT: %Dest => constants.%.7
// CHECK:STDOUT: %Dest.patt => constants.%.7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.9(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.7
// CHECK:STDOUT: %As.type => constants.%As.type.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.9(%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.7
// CHECK:STDOUT: %As.type => constants.%As.type.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Convert.8(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %.1 => constants.%.7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @As(Core.IntLiteral) {
// CHECK:STDOUT: %Dest => Core.IntLiteral
// CHECK:STDOUT: %Dest.patt => Core.IntLiteral
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %As.type => constants.%As.type.6
// CHECK:STDOUT: %Self => constants.%Self.4
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.12
// CHECK:STDOUT: %Convert => constants.%Convert.12
// CHECK:STDOUT: %.1 => constants.%.19
// CHECK:STDOUT: %.2 => constants.%.20
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.11(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.11(%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Convert.9(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %.1 => constants.%.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.12(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @impl.12(%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %N.patt => constants.%N
// CHECK:STDOUT: %.1 => constants.%.7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Convert.10(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: %.1 => constants.%.7
// CHECK:STDOUT: }
// CHECK:STDOUT: