Skip to content

Commit

Permalink
Include the call arguments in the location of a call. (#4602)
Browse files Browse the repository at this point in the history
Underline the entire call in diagnostics, not only the portion up to the
`(`.
  • Loading branch information
zygoloid authored Dec 2, 2024
1 parent d0e067a commit 63ff0cc
Show file tree
Hide file tree
Showing 106 changed files with 1,575 additions and 1,576 deletions.
5 changes: 2 additions & 3 deletions toolchain/check/handle_call_expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ auto HandleParseNode(Context& context, Parse::CallExprId node_id) -> bool {
// Process the final explicit call argument now, but leave the arguments
// block on the stack until the end of this function.
context.param_and_arg_refs_stack().EndNoPop(Parse::NodeKind::CallExprStart);
auto [call_expr_node_id, callee_id] =
context.node_stack().PopWithNodeId<Parse::NodeKind::CallExprStart>();
auto callee_id = context.node_stack().Pop<Parse::NodeKind::CallExprStart>();

auto call_id = PerformCall(
context, call_expr_node_id, callee_id,
context, node_id, callee_id,
context.param_and_arg_refs_stack().PeekCurrentBlockContents());

context.param_and_arg_refs_stack().PopAndDiscard();
Expand Down
8 changes: 4 additions & 4 deletions toolchain/check/testdata/array/array_in_place.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ fn G() {
// CHECK:STDOUT: %.loc14_42.1: Core.IntLiteral = int_value 0 [template = constants.%.6]
// CHECK:STDOUT: %.loc14_42.2: ref %tuple.type.2 = array_index %v.var, %.loc14_42.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.call.loc14_35: init %tuple.type.2 = call %F.ref.loc14_34() to %.loc14_42.3
// CHECK:STDOUT: %F.call.loc14_36: init %tuple.type.2 = call %F.ref.loc14_34() to %.loc14_42.3
// CHECK:STDOUT: %F.ref.loc14_39: %F.type = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %.loc14_42.6: ref %tuple.type.2 = splice_block %.loc14_42.5 {
// CHECK:STDOUT: %.loc14_42.4: Core.IntLiteral = int_value 1 [template = constants.%.7]
// CHECK:STDOUT: %.loc14_42.5: ref %tuple.type.2 = array_index %v.var, %.loc14_42.4
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.call.loc14_40: init %tuple.type.2 = call %F.ref.loc14_39() to %.loc14_42.6
// CHECK:STDOUT: %.loc14_42.7: %tuple.type.3 = tuple_literal (%F.call.loc14_35, %F.call.loc14_40)
// CHECK:STDOUT: %.loc14_42.8: init %.3 = array_init (%F.call.loc14_35, %F.call.loc14_40) to %v.var
// CHECK:STDOUT: %F.call.loc14_41: init %tuple.type.2 = call %F.ref.loc14_39() to %.loc14_42.6
// CHECK:STDOUT: %.loc14_42.7: %tuple.type.3 = tuple_literal (%F.call.loc14_36, %F.call.loc14_41)
// CHECK:STDOUT: %.loc14_42.8: init %.3 = array_init (%F.call.loc14_36, %F.call.loc14_41) to %v.var
// CHECK:STDOUT: %.loc14_43: init %.3 = converted %.loc14_42.7, %.loc14_42.8
// CHECK:STDOUT: assign %v.var, %.loc14_43
// CHECK:STDOUT: return
Expand Down
18 changes: 9 additions & 9 deletions toolchain/check/testdata/array/assign_return_value.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ fn Run() {
// CHECK:STDOUT: %t: ref %.31 = bind_name t, %t.var
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %F.call: init %tuple.type.2 = call %F.ref()
// CHECK:STDOUT: %.loc14_22.1: ref %tuple.type.2 = temporary_storage
// CHECK:STDOUT: %.loc14_22.2: ref %tuple.type.2 = temporary %.loc14_22.1, %F.call
// CHECK:STDOUT: %.loc14_22.3: ref %i32 = tuple_access %.loc14_22.2, element0
// CHECK:STDOUT: %.loc14_22.4: %i32 = bind_value %.loc14_22.3
// CHECK:STDOUT: %.loc14_22.5: Core.IntLiteral = int_value 0 [template = constants.%.2]
// CHECK:STDOUT: %.loc14_22.6: ref %i32 = array_index %t.var, %.loc14_22.5
// CHECK:STDOUT: %.loc14_22.7: init %i32 = initialize_from %.loc14_22.4 to %.loc14_22.6
// CHECK:STDOUT: %.loc14_22.8: init %.31 = array_init (%.loc14_22.7) to %t.var
// CHECK:STDOUT: %.loc14_24: init %.31 = converted %F.call, %.loc14_22.8
// CHECK:STDOUT: %.loc14_23.1: ref %tuple.type.2 = temporary_storage
// CHECK:STDOUT: %.loc14_23.2: ref %tuple.type.2 = temporary %.loc14_23.1, %F.call
// CHECK:STDOUT: %.loc14_23.3: ref %i32 = tuple_access %.loc14_23.2, element0
// CHECK:STDOUT: %.loc14_23.4: %i32 = bind_value %.loc14_23.3
// CHECK:STDOUT: %.loc14_23.5: Core.IntLiteral = int_value 0 [template = constants.%.2]
// CHECK:STDOUT: %.loc14_23.6: ref %i32 = array_index %t.var, %.loc14_23.5
// CHECK:STDOUT: %.loc14_23.7: init %i32 = initialize_from %.loc14_23.4 to %.loc14_23.6
// CHECK:STDOUT: %.loc14_23.8: init %.31 = array_init (%.loc14_23.7) to %t.var
// CHECK:STDOUT: %.loc14_24: init %.31 = converted %F.call, %.loc14_23.8
// CHECK:STDOUT: assign %t.var, %.loc14_24
// CHECK:STDOUT: return
// CHECK:STDOUT: }
Expand Down
38 changes: 19 additions & 19 deletions toolchain/check/testdata/array/canonicalize_index.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@ let c: [i32; ConvertToU32(3)]* = &a;
// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc14_18.6, %.loc14_21.6) [template = constants.%.34]
// CHECK:STDOUT: %.loc14_9.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32]
// CHECK:STDOUT: %.loc14_9.3: type = converted %int.make_type_signed.loc14, %.loc14_9.2 [template = constants.%i32]
// CHECK:STDOUT: %.loc14_17.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15]
// CHECK:STDOUT: %.loc14_17.2: <bound method> = bound_method %int.sadd, %.loc14_17.1 [template = constants.%.36]
// CHECK:STDOUT: %.loc14_17.3: <specific function> = specific_function %.loc14_17.2, @Convert.4(constants.%.1) [template = constants.%.37]
// CHECK:STDOUT: %.loc14_17.4: %i32 = value_of_initializer %int.sadd [template = constants.%.34]
// CHECK:STDOUT: %.loc14_17.5: %i32 = converted %int.sadd, %.loc14_17.4 [template = constants.%.34]
// CHECK:STDOUT: %int.convert_checked.loc14_17: init Core.IntLiteral = call %.loc14_17.3(%.loc14_17.5) [template = constants.%.38]
// CHECK:STDOUT: %.loc14_17.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_17 [template = constants.%.38]
// CHECK:STDOUT: %.loc14_17.7: Core.IntLiteral = converted %int.sadd, %.loc14_17.6 [template = constants.%.38]
// CHECK:STDOUT: %.loc14_23: type = array_type %.loc14_17.7, %i32 [template = constants.%.39]
// CHECK:STDOUT: %.loc14_22.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15]
// CHECK:STDOUT: %.loc14_22.2: <bound method> = bound_method %int.sadd, %.loc14_22.1 [template = constants.%.36]
// CHECK:STDOUT: %.loc14_22.3: <specific function> = specific_function %.loc14_22.2, @Convert.4(constants.%.1) [template = constants.%.37]
// CHECK:STDOUT: %.loc14_22.4: %i32 = value_of_initializer %int.sadd [template = constants.%.34]
// CHECK:STDOUT: %.loc14_22.5: %i32 = converted %int.sadd, %.loc14_22.4 [template = constants.%.34]
// CHECK:STDOUT: %int.convert_checked.loc14_22: init Core.IntLiteral = call %.loc14_22.3(%.loc14_22.5) [template = constants.%.38]
// CHECK:STDOUT: %.loc14_22.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_22 [template = constants.%.38]
// CHECK:STDOUT: %.loc14_22.7: Core.IntLiteral = converted %int.sadd, %.loc14_22.6 [template = constants.%.38]
// CHECK:STDOUT: %.loc14_23: type = array_type %.loc14_22.7, %i32 [template = constants.%.39]
// CHECK:STDOUT: %a.var: ref %.39 = var a
// CHECK:STDOUT: %a: ref %.39 = bind_name a, %a.var
// CHECK:STDOUT: %.loc15_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
Expand All @@ -178,18 +178,18 @@ let c: [i32; ConvertToU32(3)]* = &a;
// CHECK:STDOUT: %int.convert_checked.loc16_27: init %i32 = call %.loc16_27.4(%.loc16_27.1) [template = constants.%.34]
// CHECK:STDOUT: %.loc16_27.5: %i32 = value_of_initializer %int.convert_checked.loc16_27 [template = constants.%.34]
// CHECK:STDOUT: %.loc16_27.6: %i32 = converted %.loc16_27.1, %.loc16_27.5 [template = constants.%.34]
// CHECK:STDOUT: %int.convert_checked.loc16_26.1: init %u32 = call %ConvertToU32.ref(%.loc16_27.6) [template = constants.%.44]
// CHECK:STDOUT: %int.convert_checked.loc16_28.1: init %u32 = call %ConvertToU32.ref(%.loc16_27.6) [template = constants.%.44]
// CHECK:STDOUT: %.loc16_9.2: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32]
// CHECK:STDOUT: %.loc16_9.3: type = converted %int.make_type_signed.loc16, %.loc16_9.2 [template = constants.%i32]
// CHECK:STDOUT: %.loc16_26.1: %Convert.type.6 = interface_witness_access constants.%.45, element0 [template = constants.%Convert.16]
// CHECK:STDOUT: %.loc16_26.2: <bound method> = bound_method %int.convert_checked.loc16_26.1, %.loc16_26.1 [template = constants.%.46]
// CHECK:STDOUT: %.loc16_26.3: <specific function> = specific_function %.loc16_26.2, @Convert.5(constants.%.1) [template = constants.%.47]
// CHECK:STDOUT: %.loc16_26.4: %u32 = value_of_initializer %int.convert_checked.loc16_26.1 [template = constants.%.44]
// CHECK:STDOUT: %.loc16_26.5: %u32 = converted %int.convert_checked.loc16_26.1, %.loc16_26.4 [template = constants.%.44]
// CHECK:STDOUT: %int.convert_checked.loc16_26.2: init Core.IntLiteral = call %.loc16_26.3(%.loc16_26.5) [template = constants.%.38]
// CHECK:STDOUT: %.loc16_26.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_26.2 [template = constants.%.38]
// CHECK:STDOUT: %.loc16_26.7: Core.IntLiteral = converted %int.convert_checked.loc16_26.1, %.loc16_26.6 [template = constants.%.38]
// CHECK:STDOUT: %.loc16_29: type = array_type %.loc16_26.7, %i32 [template = constants.%.39]
// CHECK:STDOUT: %.loc16_28.1: %Convert.type.6 = interface_witness_access constants.%.45, element0 [template = constants.%Convert.16]
// CHECK:STDOUT: %.loc16_28.2: <bound method> = bound_method %int.convert_checked.loc16_28.1, %.loc16_28.1 [template = constants.%.46]
// CHECK:STDOUT: %.loc16_28.3: <specific function> = specific_function %.loc16_28.2, @Convert.5(constants.%.1) [template = constants.%.47]
// CHECK:STDOUT: %.loc16_28.4: %u32 = value_of_initializer %int.convert_checked.loc16_28.1 [template = constants.%.44]
// CHECK:STDOUT: %.loc16_28.5: %u32 = converted %int.convert_checked.loc16_28.1, %.loc16_28.4 [template = constants.%.44]
// CHECK:STDOUT: %int.convert_checked.loc16_28.2: init Core.IntLiteral = call %.loc16_28.3(%.loc16_28.5) [template = constants.%.38]
// CHECK:STDOUT: %.loc16_28.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_28.2 [template = constants.%.38]
// CHECK:STDOUT: %.loc16_28.7: Core.IntLiteral = converted %int.convert_checked.loc16_28.1, %.loc16_28.6 [template = constants.%.38]
// CHECK:STDOUT: %.loc16_29: type = array_type %.loc16_28.7, %i32 [template = constants.%.39]
// CHECK:STDOUT: %.loc16_30: type = ptr_type %.39 [template = constants.%.40]
// CHECK:STDOUT: }
// CHECK:STDOUT:
Expand Down
20 changes: 10 additions & 10 deletions toolchain/check/testdata/array/fail_bound_negative.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn Negate(n: i32) -> i32 = "int.snegate";

// CHECK:STDERR: fail_bound_negative.carbon:[[@LINE+3]]:14: error: array bound of -1 is negative [ArrayBoundNegative]
// CHECK:STDERR: var a: [i32; Negate(1)];
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: ^~~~~~~~~
var a: [i32; Negate(1)];

// CHECK:STDOUT: --- fail_bound_negative.carbon
Expand Down Expand Up @@ -90,15 +90,15 @@ var a: [i32; Negate(1)];
// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc16_21.6) [template = constants.%.30]
// CHECK:STDOUT: %.loc16_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
// CHECK:STDOUT: %.loc16_9.3: type = converted %int.make_type_signed, %.loc16_9.2 [template = constants.%i32]
// CHECK:STDOUT: %.loc16_20.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15]
// CHECK:STDOUT: %.loc16_20.2: <bound method> = bound_method %int.snegate, %.loc16_20.1 [template = constants.%.32]
// CHECK:STDOUT: %.loc16_20.3: <specific function> = specific_function %.loc16_20.2, @Convert.4(constants.%.1) [template = constants.%.33]
// CHECK:STDOUT: %.loc16_20.4: %i32 = value_of_initializer %int.snegate [template = constants.%.30]
// CHECK:STDOUT: %.loc16_20.5: %i32 = converted %int.snegate, %.loc16_20.4 [template = constants.%.30]
// CHECK:STDOUT: %int.convert_checked.loc16_20: init Core.IntLiteral = call %.loc16_20.3(%.loc16_20.5) [template = constants.%.34]
// CHECK:STDOUT: %.loc16_20.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_20 [template = constants.%.34]
// CHECK:STDOUT: %.loc16_20.7: Core.IntLiteral = converted %int.snegate, %.loc16_20.6 [template = constants.%.34]
// CHECK:STDOUT: %.loc16_23: type = array_type %.loc16_20.7, %i32 [template = <error>]
// CHECK:STDOUT: %.loc16_22.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15]
// CHECK:STDOUT: %.loc16_22.2: <bound method> = bound_method %int.snegate, %.loc16_22.1 [template = constants.%.32]
// CHECK:STDOUT: %.loc16_22.3: <specific function> = specific_function %.loc16_22.2, @Convert.4(constants.%.1) [template = constants.%.33]
// CHECK:STDOUT: %.loc16_22.4: %i32 = value_of_initializer %int.snegate [template = constants.%.30]
// CHECK:STDOUT: %.loc16_22.5: %i32 = converted %int.snegate, %.loc16_22.4 [template = constants.%.30]
// CHECK:STDOUT: %int.convert_checked.loc16_22: init Core.IntLiteral = call %.loc16_22.3(%.loc16_22.5) [template = constants.%.34]
// CHECK:STDOUT: %.loc16_22.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_22 [template = constants.%.34]
// CHECK:STDOUT: %.loc16_22.7: Core.IntLiteral = converted %int.snegate, %.loc16_22.6 [template = constants.%.34]
// CHECK:STDOUT: %.loc16_23: type = array_type %.loc16_22.7, %i32 [template = <error>]
// CHECK:STDOUT: %a.var: ref <error> = var a
// CHECK:STDOUT: %a: ref <error> = bind_name a, %a.var
// CHECK:STDOUT: }
Expand Down
28 changes: 14 additions & 14 deletions toolchain/check/testdata/as/no_prelude/tuple.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,21 @@ fn Var() {
// CHECK:STDOUT: %.loc19_15.1: %tuple.type.1 = tuple_literal (%X.ref.loc19_11, %X.ref.loc19_14)
// CHECK:STDOUT: %.loc19_15.2: type = converted %.loc19_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: %Make.ref.loc19_20: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make]
// CHECK:STDOUT: %.loc19_24.1: ref %X = temporary_storage
// CHECK:STDOUT: %Make.call.loc19_24: init %X = call %Make.ref.loc19_20() to %.loc19_24.1
// CHECK:STDOUT: %.loc19_25.1: ref %X = temporary_storage
// CHECK:STDOUT: %Make.call.loc19_25: init %X = call %Make.ref.loc19_20() to %.loc19_25.1
// CHECK:STDOUT: %Make.ref.loc19_28: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make]
// CHECK:STDOUT: %.loc19_32.1: ref %X = temporary_storage
// CHECK:STDOUT: %Make.call.loc19_32: init %X = call %Make.ref.loc19_28() to %.loc19_32.1
// CHECK:STDOUT: %.loc19_34: %tuple.type.2 = tuple_literal (%Make.call.loc19_24, %Make.call.loc19_32)
// CHECK:STDOUT: %.loc19_33.1: ref %X = temporary_storage
// CHECK:STDOUT: %Make.call.loc19_33: init %X = call %Make.ref.loc19_28() to %.loc19_33.1
// CHECK:STDOUT: %.loc19_34: %tuple.type.2 = tuple_literal (%Make.call.loc19_25, %Make.call.loc19_33)
// CHECK:STDOUT: %X.ref.loc19_40: type = name_ref X, file.%X.decl [template = constants.%X]
// CHECK:STDOUT: %X.ref.loc19_43: type = name_ref X, file.%X.decl [template = constants.%X]
// CHECK:STDOUT: %.loc19_44.1: %tuple.type.1 = tuple_literal (%X.ref.loc19_40, %X.ref.loc19_43)
// CHECK:STDOUT: %.loc19_44.2: type = converted %.loc19_44.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: %.loc19_24.2: ref %X = temporary %.loc19_24.1, %Make.call.loc19_24
// CHECK:STDOUT: %.loc19_24.3: %X = bind_value %.loc19_24.2
// CHECK:STDOUT: %.loc19_32.2: ref %X = temporary %.loc19_32.1, %Make.call.loc19_32
// CHECK:STDOUT: %.loc19_32.3: %X = bind_value %.loc19_32.2
// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc19_24.3, %.loc19_32.3)
// CHECK:STDOUT: %.loc19_25.2: ref %X = temporary %.loc19_25.1, %Make.call.loc19_25
// CHECK:STDOUT: %.loc19_25.3: %X = bind_value %.loc19_25.2
// CHECK:STDOUT: %.loc19_33.2: ref %X = temporary %.loc19_33.1, %Make.call.loc19_33
// CHECK:STDOUT: %.loc19_33.3: %X = bind_value %.loc19_33.2
// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc19_25.3, %.loc19_33.3)
// CHECK:STDOUT: %.loc19_45: %tuple.type.2 = converted %.loc19_34, %tuple
// CHECK:STDOUT: %a: %tuple.type.2 = bind_name a, %.loc19_45
// CHECK:STDOUT: return
Expand All @@ -107,16 +107,16 @@ fn Var() {
// CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var
// CHECK:STDOUT: %Make.ref.loc24_20: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make]
// CHECK:STDOUT: %.loc24_34.1: ref %X = tuple_access %b.var, element0
// CHECK:STDOUT: %Make.call.loc24_24: init %X = call %Make.ref.loc24_20() to %.loc24_34.1
// CHECK:STDOUT: %Make.call.loc24_25: init %X = call %Make.ref.loc24_20() to %.loc24_34.1
// CHECK:STDOUT: %Make.ref.loc24_28: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make]
// CHECK:STDOUT: %.loc24_34.2: ref %X = tuple_access %b.var, element1
// CHECK:STDOUT: %Make.call.loc24_32: init %X = call %Make.ref.loc24_28() to %.loc24_34.2
// CHECK:STDOUT: %.loc24_34.3: %tuple.type.2 = tuple_literal (%Make.call.loc24_24, %Make.call.loc24_32)
// CHECK:STDOUT: %Make.call.loc24_33: init %X = call %Make.ref.loc24_28() to %.loc24_34.2
// CHECK:STDOUT: %.loc24_34.3: %tuple.type.2 = tuple_literal (%Make.call.loc24_25, %Make.call.loc24_33)
// CHECK:STDOUT: %X.ref.loc24_40: type = name_ref X, file.%X.decl [template = constants.%X]
// CHECK:STDOUT: %X.ref.loc24_43: type = name_ref X, file.%X.decl [template = constants.%X]
// CHECK:STDOUT: %.loc24_44.1: %tuple.type.1 = tuple_literal (%X.ref.loc24_40, %X.ref.loc24_43)
// CHECK:STDOUT: %.loc24_44.2: type = converted %.loc24_44.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: %.loc24_34.4: init %tuple.type.2 = tuple_init (%Make.call.loc24_24, %Make.call.loc24_32) to %b.var
// CHECK:STDOUT: %.loc24_34.4: init %tuple.type.2 = tuple_init (%Make.call.loc24_25, %Make.call.loc24_33) to %b.var
// CHECK:STDOUT: %.loc24_45: init %tuple.type.2 = converted %.loc24_34.3, %.loc24_34.4
// CHECK:STDOUT: assign %b.var, %.loc24_45
// CHECK:STDOUT: return
Expand Down
4 changes: 2 additions & 2 deletions toolchain/check/testdata/as/overloaded.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ let n: i32 = ((4 as i32) as X) as i32;
// CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, imports.%import_ref.2 [template = constants.%As]
// CHECK:STDOUT: %.loc19_19: Core.IntLiteral = int_value 32 [template = constants.%.1]
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_19) [template = constants.%i32]
// CHECK:STDOUT: %.loc19_18.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
// CHECK:STDOUT: %.loc19_18.2: type = converted %int.make_type_signed, %.loc19_18.1 [template = constants.%i32]
// CHECK:STDOUT: %.loc19_22.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
// CHECK:STDOUT: %.loc19_22.2: type = converted %int.make_type_signed, %.loc19_22.1 [template = constants.%i32]
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%i32)> [template = constants.%As.type.4]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc23_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
Expand Down
Loading

0 comments on commit 63ff0cc

Please sign in to comment.