mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-24 10:02:45 +00:00
Switch tests to use the rendered form of diagnostics (#8070)
Historically, we disabled the rendered form in tests outside of `toolchain/diagnostics`. The idea was to keep tests shorter and avoid very long chains of autoupdate before stabilizing due to all the line numbers and other artifacts in the rendered form. This PR adds `--diagnostic-line-numbers=[all|first]` and defaults to `first` in tests. This keeps the rendered form so that we can easily code review that form and the visual cues it does or doesn't provide. But it removes all but the first location's line numbers to provide significantly more stability in tests. By default, tests get the full unicode line-drawing form of diagnostics so we can ensure all of the artifacts there make sense with the specific case being diagnosed, but we do retain some focused ASCII-rendering tests to ensure that fallback remains usable. There are some issues here that will be fixed in subsequent PRs. Notably, we try to keep the frame together in the check lines, and so force some parts to use the first location. This largely works, but fails in some edge cases, causing the entire frame to be located incorrectly. There is a TODO about this that we need to fix, and it only occurs 6 times across the test suite, so it didn't seem worth front-loading a fix for here. Assisted-by: Claude Code
This commit is contained in:
1 parent
0b7059a360
commit
d0badecd2a
888 files changed
+39731
-12799
No files matched your search
+108
-78
@@ -20,8 +20,16 @@ class NoParams {}
|
||||
class EmptyParams() {}
|
||||
|
||||
var v: NoParams;
|
||||
// CHECK:STDERR: fail_empty_params.carbon:[[@LINE+3]]:1-20: error: cannot implicitly convert expression of type `NoParams` to `EmptyParams()` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_empty_params.carbon:[[@LINE+2]]:1-20: note: type `NoParams` does not implement interface `Core.ImplicitAs(EmptyParams())` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_empty_params.carbon:[[@LINE+11]]:1
|
||||
// CHECK:STDERR: -> │ var w: EmptyParams() = v;
|
||||
// CHECK:STDERR: · ┳━━━━━━━━━━━━━━━━━━━
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of type `NoParams` to
|
||||
// CHECK:STDERR: · │ ┃ `EmptyParams()`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰────┤ type `NoParams` does not implement interface
|
||||
// CHECK:STDERR: · │ `Core.ImplicitAs(EmptyParams())`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
var w: EmptyParams() = v;
|
||||
|
||||
@@ -37,8 +45,16 @@ class Outer(T: type) {
|
||||
var v: Outer({}*);
|
||||
|
||||
// TODO: It would be nice to include the `Outer({}*).` prefix in the name of `Inner`.
|
||||
// CHECK:STDERR: fail_nested.carbon:[[@LINE+3]]:1-35: error: cannot implicitly convert expression of type `Outer({}*)` to `Inner({.a: i32}*)` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_nested.carbon:[[@LINE+2]]:1-35: note: type `Outer({}*)` does not implement interface `Core.ImplicitAs(Inner({.a: i32}*))` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_nested.carbon:[[@LINE+11]]:1
|
||||
// CHECK:STDERR: -> │ var w: Outer({}*).Inner({.a: i32}*) = v;
|
||||
// CHECK:STDERR: · ┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of type `Outer({}*)` to
|
||||
// CHECK:STDERR: · │ ┃ `Inner({.a: i32}*)`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰────┤ type `Outer({}*)` does not implement interface
|
||||
// CHECK:STDERR: · │ `Core.ImplicitAs(Inner({.a: i32}*))`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
var w: Outer({}*).Inner({.a: i32}*) = v;
|
||||
|
||||
@@ -48,8 +64,14 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
class C(N: i32) {}
|
||||
|
||||
// CHECK:STDERR: fail_int_value.carbon:[[@LINE+3]]:1-13: error: cannot implicitly convert expression of type `()` to `C(123)` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_int_value.carbon:[[@LINE+2]]:1-13: note: type `()` does not implement interface `Core.ImplicitAs(C(123))` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_int_value.carbon:[[@LINE+9]]:1
|
||||
// CHECK:STDERR: -> │ var v: C(123) = ();
|
||||
// CHECK:STDERR: · ━━━━━━┳━━━━━━
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of type `()` to `C(123)`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰────┤ type `()` does not implement interface `Core.ImplicitAs(C(123))`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
var v: C(123) = ();
|
||||
|
||||
@@ -64,8 +86,16 @@ class D {
|
||||
|
||||
class E(F: D) {}
|
||||
|
||||
// CHECK:STDERR: fail_class_param.carbon:[[@LINE+3]]:1-26: error: cannot implicitly convert expression of type `E({.a = 3, .b = 4})` to `E({.a = 1, .b = 2})` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_class_param.carbon:[[@LINE+2]]:1-26: note: type `E({.a = 3, .b = 4})` does not implement interface `Core.ImplicitAs(E({.a = 1, .b = 2}))` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_class_param.carbon:[[@LINE+11]]:1
|
||||
// CHECK:STDERR: -> │ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D);
|
||||
// CHECK:STDERR: · ┳━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of type `E({.a = 3, .b = 4})`
|
||||
// CHECK:STDERR: · │ ┃ to `E({.a = 1, .b = 2})`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰────┤ type `E({.a = 3, .b = 4})` does not implement interface
|
||||
// CHECK:STDERR: · │ `Core.ImplicitAs(E({.a = 1, .b = 2}))`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D);
|
||||
|
||||
@@ -130,7 +160,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D);
|
||||
// CHECK:STDOUT: %v.var_patt: %pattern_type.c07 = var_pattern %v.patt [concrete = constants.%v.var_patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %w.var: ref %EmptyParams = var_storage %w.var_patt [concrete]
|
||||
// CHECK:STDOUT: %.loc11: type = splice_block %EmptyParams [concrete = constants.%EmptyParams] {
|
||||
// CHECK:STDOUT: %.loc19: type = splice_block %EmptyParams [concrete = constants.%EmptyParams] {
|
||||
// CHECK:STDOUT: %EmptyParams.ref: %EmptyParams.type = name_ref EmptyParams, %EmptyParams.decl [concrete = constants.%EmptyParams.generic]
|
||||
// CHECK:STDOUT: %EmptyParams: type = class_type @EmptyParams [concrete = constants.%EmptyParams]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -168,7 +198,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D);
|
||||
// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %NoParams to %.loc7_1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn()
|
||||
// CHECK:STDOUT: assign file.%v.var, %T.as.DefaultOrUnformed.impl.Op.call
|
||||
// CHECK:STDOUT: %v.ref: ref %NoParams = name_ref v, file.%v [concrete = file.%v.var]
|
||||
// CHECK:STDOUT: %.loc11: %EmptyParams = converted %v.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc19: %EmptyParams = converted %v.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: assign file.%w.var, <error>
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
@@ -267,17 +297,17 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D);
|
||||
// CHECK:STDOUT: %v.var_patt: %pattern_type.dbc = var_pattern %v.patt [concrete = constants.%v.var_patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %w.var: ref %Inner.8dc = var_storage %w.var_patt [concrete]
|
||||
// CHECK:STDOUT: %.loc15_35: type = splice_block %Inner [concrete = constants.%Inner.8dc] {
|
||||
// CHECK:STDOUT: %Outer.ref.loc15: %Outer.type = name_ref Outer, %Outer.decl [concrete = constants.%Outer.generic]
|
||||
// CHECK:STDOUT: %.loc15_15: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc15_16: type = converted %.loc15_15, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %ptr.loc15_16: type = ptr_type %.loc15_16 [concrete = constants.%ptr.c28]
|
||||
// CHECK:STDOUT: %Outer.loc15: type = class_type @Outer, @Outer(constants.%ptr.c28) [concrete = constants.%Outer.856]
|
||||
// CHECK:STDOUT: %.loc15_18: %Inner.type.894 = specific_constant @Outer.%Inner.decl, @Outer(constants.%ptr.c28) [concrete = constants.%Inner.generic.787]
|
||||
// CHECK:STDOUT: %Inner.ref: %Inner.type.894 = name_ref Inner, %.loc15_18 [concrete = constants.%Inner.generic.787]
|
||||
// CHECK:STDOUT: %.loc23_35: type = splice_block %Inner [concrete = constants.%Inner.8dc] {
|
||||
// CHECK:STDOUT: %Outer.ref.loc23: %Outer.type = name_ref Outer, %Outer.decl [concrete = constants.%Outer.generic]
|
||||
// CHECK:STDOUT: %.loc23_15: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc23_16: type = converted %.loc23_15, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %ptr.loc23_16: type = ptr_type %.loc23_16 [concrete = constants.%ptr.c28]
|
||||
// CHECK:STDOUT: %Outer.loc23: type = class_type @Outer, @Outer(constants.%ptr.c28) [concrete = constants.%Outer.856]
|
||||
// CHECK:STDOUT: %.loc23_18: %Inner.type.894 = specific_constant @Outer.%Inner.decl, @Outer(constants.%ptr.c28) [concrete = constants.%Inner.generic.787]
|
||||
// CHECK:STDOUT: %Inner.ref: %Inner.type.894 = name_ref Inner, %.loc23_18 [concrete = constants.%Inner.generic.787]
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [concrete = constants.%struct_type.a]
|
||||
// CHECK:STDOUT: %ptr.loc15_34: type = ptr_type %struct_type.a [concrete = constants.%ptr.54f]
|
||||
// CHECK:STDOUT: %ptr.loc23_34: type = ptr_type %struct_type.a [concrete = constants.%ptr.54f]
|
||||
// CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(constants.%ptr.c28, constants.%ptr.54f) [concrete = constants.%Inner.8dc]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %w: ref %Inner.8dc = wrapper_binding w, %w.var [concrete = %w.var]
|
||||
@@ -340,7 +370,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D);
|
||||
// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Outer.856 to %.loc9_1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn()
|
||||
// CHECK:STDOUT: assign file.%v.var, %T.as.DefaultOrUnformed.impl.Op.call
|
||||
// CHECK:STDOUT: %v.ref: ref %Outer.856 = name_ref v, file.%v [concrete = file.%v.var]
|
||||
// CHECK:STDOUT: %.loc15: %Inner.8dc = converted %v.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc23: %Inner.8dc = converted %v.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: assign file.%w.var, <error>
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
@@ -443,16 +473,16 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D);
|
||||
// CHECK:STDOUT: %N.loc4_10.2: %i32 = symbolic_binding N, 0 [symbolic = %N.loc4_10.1 (constants.%N.c34)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v.var: ref %C.a98 = var_storage %v.var_patt [concrete]
|
||||
// CHECK:STDOUT: %.loc9_13.1: type = splice_block %C [concrete = constants.%C.a98] {
|
||||
// CHECK:STDOUT: %.loc15_13.1: type = splice_block %C [concrete = constants.%C.a98] {
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic]
|
||||
// CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [concrete = constants.%int_123.fff]
|
||||
// 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.loc9_13.1: <bound method> = bound_method %int_123, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %bound_method.loc15_13.1: <bound method> = bound_method %int_123, %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.loc9_13.2: <bound method> = bound_method %int_123, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc9_13.2(%int_123) [concrete = constants.%int_123.c07]
|
||||
// CHECK:STDOUT: %.loc9_13.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_123.c07]
|
||||
// CHECK:STDOUT: %.loc9_13.3: %i32 = converted %int_123, %.loc9_13.2 [concrete = constants.%int_123.c07]
|
||||
// CHECK:STDOUT: %bound_method.loc15_13.2: <bound method> = bound_method %int_123, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc15_13.2(%int_123) [concrete = constants.%int_123.c07]
|
||||
// CHECK:STDOUT: %.loc15_13.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_123.c07]
|
||||
// CHECK:STDOUT: %.loc15_13.3: %i32 = converted %int_123, %.loc15_13.2 [concrete = constants.%int_123.c07]
|
||||
// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_123.c07) [concrete = constants.%C.a98]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v: ref %C.a98 = wrapper_binding v, %v.var [concrete = %v.var]
|
||||
@@ -479,8 +509,8 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc9_18: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc9_1: %C.a98 = converted %.loc9_18, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc15_18: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc15_1: %C.a98 = converted %.loc15_18, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: assign file.%v.var, <error>
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
@@ -595,32 +625,32 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D);
|
||||
// CHECK:STDOUT: %F.loc9_10.2: %D = symbolic_binding F, 0 [symbolic = %F.loc9_10.1 (constants.%F)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %g.var: ref %E.468 = var_storage %g.var_patt [concrete]
|
||||
// CHECK:STDOUT: %.loc14_26.1: type = splice_block %E [concrete = constants.%E.468] {
|
||||
// CHECK:STDOUT: %.loc22_26.1: type = splice_block %E [concrete = constants.%E.468] {
|
||||
// CHECK:STDOUT: %E.ref: %E.type = name_ref E, %E.decl [concrete = constants.%E.generic]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %.loc14_25.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) [concrete = constants.%struct.4aa]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_25.1: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc14_25.1: <bound method> = bound_method %int_1, %impl.elem0.loc14_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282]
|
||||
// CHECK:STDOUT: %specific_fn.loc14_25.1: <specific function> = specific_function %impl.elem0.loc14_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc14_25.2: <bound method> = bound_method %int_1, %specific_fn.loc14_25.1 [concrete = constants.%bound_method.3bd]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14_25.1: init %i32 = call %bound_method.loc14_25.2(%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc14_25.2: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14_25.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc14_25.3: ref %D = temporary_storage
|
||||
// CHECK:STDOUT: %.loc14_25.4: ref %i32 = class_element_access %.loc14_25.3, element0
|
||||
// CHECK:STDOUT: %.loc14_25.5: init %i32 to %.loc14_25.4 = in_place_init %.loc14_25.2 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_25.2: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc14_25.3: <bound method> = bound_method %int_2, %impl.elem0.loc14_25.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a6]
|
||||
// CHECK:STDOUT: %specific_fn.loc14_25.2: <specific function> = specific_function %impl.elem0.loc14_25.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc14_25.4: <bound method> = bound_method %int_2, %specific_fn.loc14_25.2 [concrete = constants.%bound_method.a55]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14_25.2: init %i32 = call %bound_method.loc14_25.4(%int_2) [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc14_25.6: init %i32 = converted %int_2, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14_25.2 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc14_25.7: ref %i32 = class_element_access %.loc14_25.3, element1
|
||||
// CHECK:STDOUT: %.loc14_25.8: init %i32 to %.loc14_25.7 = in_place_init %.loc14_25.6 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc14_25.9: init %D to %.loc14_25.3 = class_init (%.loc14_25.5, %.loc14_25.8) [concrete = constants.%D.val.b5e]
|
||||
// CHECK:STDOUT: %.loc14_26.2: init %D = converted %.loc14_25.1, %.loc14_25.9 [concrete = constants.%D.val.b5e]
|
||||
// CHECK:STDOUT: %.loc14_26.3: ref %D = temporary %.loc14_25.3, %.loc14_26.2 [concrete = constants.%.738]
|
||||
// CHECK:STDOUT: %.loc14_26.4: %D = acquire_value %.loc14_26.3 [concrete = constants.%D.val.b5e]
|
||||
// CHECK:STDOUT: %.loc22_25.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) [concrete = constants.%struct.4aa]
|
||||
// CHECK:STDOUT: %impl.elem0.loc22_25.1: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc22_25.1: <bound method> = bound_method %int_1, %impl.elem0.loc22_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282]
|
||||
// CHECK:STDOUT: %specific_fn.loc22_25.1: <specific function> = specific_function %impl.elem0.loc22_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc22_25.2: <bound method> = bound_method %int_1, %specific_fn.loc22_25.1 [concrete = constants.%bound_method.3bd]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_25.1: init %i32 = call %bound_method.loc22_25.2(%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc22_25.2: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_25.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc22_25.3: ref %D = temporary_storage
|
||||
// CHECK:STDOUT: %.loc22_25.4: ref %i32 = class_element_access %.loc22_25.3, element0
|
||||
// CHECK:STDOUT: %.loc22_25.5: init %i32 to %.loc22_25.4 = in_place_init %.loc22_25.2 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %impl.elem0.loc22_25.2: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc22_25.3: <bound method> = bound_method %int_2, %impl.elem0.loc22_25.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a6]
|
||||
// CHECK:STDOUT: %specific_fn.loc22_25.2: <specific function> = specific_function %impl.elem0.loc22_25.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc22_25.4: <bound method> = bound_method %int_2, %specific_fn.loc22_25.2 [concrete = constants.%bound_method.a55]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_25.2: init %i32 = call %bound_method.loc22_25.4(%int_2) [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc22_25.6: init %i32 = converted %int_2, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_25.2 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc22_25.7: ref %i32 = class_element_access %.loc22_25.3, element1
|
||||
// CHECK:STDOUT: %.loc22_25.8: init %i32 to %.loc22_25.7 = in_place_init %.loc22_25.6 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc22_25.9: init %D to %.loc22_25.3 = class_init (%.loc22_25.5, %.loc22_25.8) [concrete = constants.%D.val.b5e]
|
||||
// CHECK:STDOUT: %.loc22_26.2: init %D = converted %.loc22_25.1, %.loc22_25.9 [concrete = constants.%D.val.b5e]
|
||||
// CHECK:STDOUT: %.loc22_26.3: ref %D = temporary %.loc22_25.3, %.loc22_26.2 [concrete = constants.%.738]
|
||||
// CHECK:STDOUT: %.loc22_26.4: %D = acquire_value %.loc22_26.3 [concrete = constants.%D.val.b5e]
|
||||
// CHECK:STDOUT: %E: type = class_type @E, @E(constants.%D.val.b5e) [concrete = constants.%E.468]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %g: ref %E.468 = wrapper_binding g, %g.var [concrete = %g.var]
|
||||
@@ -663,38 +693,38 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc14_31.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc22_31.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %E.ref: %E.type = name_ref E, file.%E.decl [concrete = constants.%E.generic]
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
|
||||
// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1]
|
||||
// CHECK:STDOUT: %.loc14_53.1: %struct_type.a.b.cfd = struct_literal (%int_3, %int_4) [concrete = constants.%struct.cb7]
|
||||
// CHECK:STDOUT: %.loc22_53.1: %struct_type.a.b.cfd = struct_literal (%int_3, %int_4) [concrete = constants.%struct.cb7]
|
||||
// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_53.1: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc14_53.1: <bound method> = bound_method %int_3, %impl.elem0.loc14_53.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b3c]
|
||||
// CHECK:STDOUT: %specific_fn.loc14_53.1: <specific function> = specific_function %impl.elem0.loc14_53.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc14_53.2: <bound method> = bound_method %int_3, %specific_fn.loc14_53.1 [concrete = constants.%bound_method.fb0]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14_53.1: init %i32 = call %bound_method.loc14_53.2(%int_3) [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %.loc14_53.2: init %i32 = converted %int_3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14_53.1 [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %.loc14_53.3: ref %D = temporary_storage
|
||||
// CHECK:STDOUT: %.loc14_53.4: ref %i32 = class_element_access %.loc14_53.3, element0
|
||||
// CHECK:STDOUT: %.loc14_53.5: init %i32 to %.loc14_53.4 = in_place_init %.loc14_53.2 [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_53.2: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc14_53.3: <bound method> = bound_method %int_4, %impl.elem0.loc14_53.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.776]
|
||||
// CHECK:STDOUT: %specific_fn.loc14_53.2: <specific function> = specific_function %impl.elem0.loc14_53.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc14_53.4: <bound method> = bound_method %int_4, %specific_fn.loc14_53.2 [concrete = constants.%bound_method.7fa]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14_53.2: init %i32 = call %bound_method.loc14_53.4(%int_4) [concrete = constants.%int_4.6bf]
|
||||
// CHECK:STDOUT: %.loc14_53.6: init %i32 = converted %int_4, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14_53.2 [concrete = constants.%int_4.6bf]
|
||||
// CHECK:STDOUT: %.loc14_53.7: ref %i32 = class_element_access %.loc14_53.3, element1
|
||||
// CHECK:STDOUT: %.loc14_53.8: init %i32 to %.loc14_53.7 = in_place_init %.loc14_53.6 [concrete = constants.%int_4.6bf]
|
||||
// CHECK:STDOUT: %.loc14_53.9: init %D to %.loc14_53.3 = class_init (%.loc14_53.5, %.loc14_53.8) [concrete = constants.%D.val.db4]
|
||||
// CHECK:STDOUT: %.loc14_55.1: init %D = converted %.loc14_53.1, %.loc14_53.9 [concrete = constants.%D.val.db4]
|
||||
// CHECK:STDOUT: %.loc14_55.2: ref %D = temporary %.loc14_53.3, %.loc14_55.1 [concrete = constants.%.c27]
|
||||
// CHECK:STDOUT: %.loc14_55.3: %D = acquire_value %.loc14_55.2 [concrete = constants.%D.val.db4]
|
||||
// CHECK:STDOUT: %impl.elem0.loc22_53.1: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc22_53.1: <bound method> = bound_method %int_3, %impl.elem0.loc22_53.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b3c]
|
||||
// CHECK:STDOUT: %specific_fn.loc22_53.1: <specific function> = specific_function %impl.elem0.loc22_53.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc22_53.2: <bound method> = bound_method %int_3, %specific_fn.loc22_53.1 [concrete = constants.%bound_method.fb0]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_53.1: init %i32 = call %bound_method.loc22_53.2(%int_3) [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %.loc22_53.2: init %i32 = converted %int_3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_53.1 [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %.loc22_53.3: ref %D = temporary_storage
|
||||
// CHECK:STDOUT: %.loc22_53.4: ref %i32 = class_element_access %.loc22_53.3, element0
|
||||
// CHECK:STDOUT: %.loc22_53.5: init %i32 to %.loc22_53.4 = in_place_init %.loc22_53.2 [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %impl.elem0.loc22_53.2: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc22_53.3: <bound method> = bound_method %int_4, %impl.elem0.loc22_53.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.776]
|
||||
// CHECK:STDOUT: %specific_fn.loc22_53.2: <specific function> = specific_function %impl.elem0.loc22_53.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc22_53.4: <bound method> = bound_method %int_4, %specific_fn.loc22_53.2 [concrete = constants.%bound_method.7fa]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_53.2: init %i32 = call %bound_method.loc22_53.4(%int_4) [concrete = constants.%int_4.6bf]
|
||||
// CHECK:STDOUT: %.loc22_53.6: init %i32 = converted %int_4, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_53.2 [concrete = constants.%int_4.6bf]
|
||||
// CHECK:STDOUT: %.loc22_53.7: ref %i32 = class_element_access %.loc22_53.3, element1
|
||||
// CHECK:STDOUT: %.loc22_53.8: init %i32 to %.loc22_53.7 = in_place_init %.loc22_53.6 [concrete = constants.%int_4.6bf]
|
||||
// CHECK:STDOUT: %.loc22_53.9: init %D to %.loc22_53.3 = class_init (%.loc22_53.5, %.loc22_53.8) [concrete = constants.%D.val.db4]
|
||||
// CHECK:STDOUT: %.loc22_55.1: init %D = converted %.loc22_53.1, %.loc22_53.9 [concrete = constants.%D.val.db4]
|
||||
// CHECK:STDOUT: %.loc22_55.2: ref %D = temporary %.loc22_53.3, %.loc22_55.1 [concrete = constants.%.c27]
|
||||
// CHECK:STDOUT: %.loc22_55.3: %D = acquire_value %.loc22_55.2 [concrete = constants.%D.val.db4]
|
||||
// CHECK:STDOUT: %E: type = class_type @E, @E(constants.%D.val.db4) [concrete = constants.%E.dc1]
|
||||
// CHECK:STDOUT: %.loc14_31.2: ref %E.dc1 = temporary_storage
|
||||
// CHECK:STDOUT: %.loc14_31.3: init %E.dc1 to %.loc14_31.2 = class_init () [concrete = constants.%E.val]
|
||||
// CHECK:STDOUT: %.loc14_33: init %E.dc1 = converted %.loc14_31.1, %.loc14_31.3 [concrete = constants.%E.val]
|
||||
// CHECK:STDOUT: %.loc14_1: %E.468 = converted %.loc14_33, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc22_31.2: ref %E.dc1 = temporary_storage
|
||||
// CHECK:STDOUT: %.loc22_31.3: init %E.dc1 to %.loc22_31.2 = class_init () [concrete = constants.%E.val]
|
||||
// CHECK:STDOUT: %.loc22_33: init %E.dc1 = converted %.loc22_31.1, %.loc22_31.3 [concrete = constants.%E.val]
|
||||
// CHECK:STDOUT: %.loc22_1: %E.468 = converted %.loc22_33, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: assign file.%g.var, <error>
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
Reference in new issue
Block a user