mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-24 11:22:43 +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
+331
-170
@@ -92,8 +92,16 @@ import Cpp library "implicit_conversions.h";
|
||||
|
||||
fn NonConstConversionTest(s: Cpp.NonConstConversion) {
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: fail_expr_category.carbon:[[@LINE+3]]:21: error: cannot implicitly convert expression of type `NonConstConversion` to `Cpp.Dest` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_expr_category.carbon:[[@LINE+2]]:21: note: type `Cpp.NonConstConversion` does not implement interface `Core.ImplicitAs(Cpp.Dest)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_expr_category.carbon:[[@LINE+11]]:21
|
||||
// CHECK:STDERR: -> │ let _: Cpp.Dest = s;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of type
|
||||
// CHECK:STDERR: · │ ┃ `NonConstConversion` to `Cpp.Dest`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰────┤ type `Cpp.NonConstConversion` does not implement
|
||||
// CHECK:STDERR: · │ interface `Core.ImplicitAs(Cpp.Dest)`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.Dest = s;
|
||||
//@dump-sem-ir-end
|
||||
@@ -107,8 +115,20 @@ import Cpp library "implicit_conversions.h";
|
||||
|
||||
fn InaccessibleConstructorTest(s: Cpp.Source) {
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: fail_access.carbon:[[@LINE+3]]:40: error: cannot access private member `InaccessibleConstructor` of type `Cpp.InaccessibleConstructor` [ClassInvalidMemberAccess]
|
||||
// CHECK:STDERR: ./implicit_conversions.h:21:3: note: declared here [ClassMemberDeclaration]
|
||||
// CHECK:STDERR: ╭─┤ fail_access.carbon:[[@LINE+15]]:40
|
||||
// CHECK:STDERR: -> │ let _: Cpp.InaccessibleConstructor = s;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot access private member
|
||||
// CHECK:STDERR: · ┃ `InaccessibleConstructor` of
|
||||
// CHECK:STDERR: · ┃ type
|
||||
// CHECK:STDERR: · ┃ `Cpp.InaccessibleConstructor`
|
||||
// CHECK:STDERR: · ┃ [ClassInvalidMemberAccess]
|
||||
// CHECK:STDERR: ┆
|
||||
// CHECK:STDERR: ├─┤ ./implicit_conversions.h
|
||||
// CHECK:STDERR: │ InaccessibleConstructor(Source);
|
||||
// CHECK:STDERR: · ┬
|
||||
// CHECK:STDERR: · ╰──┤ declared here [ClassMemberDeclaration]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.InaccessibleConstructor = s;
|
||||
//@dump-sem-ir-end
|
||||
@@ -116,8 +136,18 @@ fn InaccessibleConstructorTest(s: Cpp.Source) {
|
||||
|
||||
fn InaccessibleConversionTest(s: Cpp.InaccessibleConversion) {
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: fail_access.carbon:[[@LINE+3]]:21: error: cannot access private member `<C++ operator>` of type `Cpp.InaccessibleConversion` [ClassInvalidMemberAccess]
|
||||
// CHECK:STDERR: ./implicit_conversions.h:26:3: note: declared here [ClassMemberDeclaration]
|
||||
// CHECK:STDERR: ╭─┤ fail_access.carbon:[[@LINE+13]]:21
|
||||
// CHECK:STDERR: -> │ let _: Cpp.Dest = s;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot access private member `<C++ operator>` of
|
||||
// CHECK:STDERR: · ┃ type `Cpp.InaccessibleConversion`
|
||||
// CHECK:STDERR: · ┃ [ClassInvalidMemberAccess]
|
||||
// CHECK:STDERR: ┆
|
||||
// CHECK:STDERR: ├─┤ ./implicit_conversions.h
|
||||
// CHECK:STDERR: │ operator Dest() const;
|
||||
// CHECK:STDERR: · ┬
|
||||
// CHECK:STDERR: · ╰──┤ declared here [ClassMemberDeclaration]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.Dest = s;
|
||||
//@dump-sem-ir-end
|
||||
@@ -131,8 +161,18 @@ import Cpp library "implicit_conversions.h";
|
||||
|
||||
fn DeletedConstructorTest(s: Cpp.Source) {
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: fail_deleted.carbon:[[@LINE+3]]:35: error: cannot implicitly convert expression of type `Source` to `Cpp.DeletedConstructor` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_deleted.carbon:[[@LINE+2]]:35: note: type `Cpp.Source` does not implement interface `Core.ImplicitAs(Cpp.DeletedConstructor)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_deleted.carbon:[[@LINE+13]]:35
|
||||
// CHECK:STDERR: -> │ let _: Cpp.DeletedConstructor = s;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert
|
||||
// CHECK:STDERR: · │ ┃ expression of type `Source` to
|
||||
// CHECK:STDERR: · │ ┃ `Cpp.DeletedConstructor`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╭─────────────────────────────────╯
|
||||
// CHECK:STDERR: · │ type `Cpp.Source` does not implement interface
|
||||
// CHECK:STDERR: · │ `Core.ImplicitAs(Cpp.DeletedConstructor)`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.DeletedConstructor = s;
|
||||
//@dump-sem-ir-end
|
||||
@@ -140,8 +180,16 @@ fn DeletedConstructorTest(s: Cpp.Source) {
|
||||
|
||||
fn DeletedConversionTest(s: Cpp.DeletedConversion) {
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: fail_deleted.carbon:[[@LINE+3]]:21: error: cannot implicitly convert expression of type `DeletedConversion` to `Cpp.Dest` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_deleted.carbon:[[@LINE+2]]:21: note: type `Cpp.DeletedConversion` does not implement interface `Core.ImplicitAs(Cpp.Dest)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_deleted.carbon:[[@LINE+11]]:21
|
||||
// CHECK:STDERR: -> │ let _: Cpp.Dest = s;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of type
|
||||
// CHECK:STDERR: · │ ┃ `DeletedConversion` to `Cpp.Dest`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰────┤ type `Cpp.DeletedConversion` does not implement
|
||||
// CHECK:STDERR: · │ interface `Core.ImplicitAs(Cpp.Dest)`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.Dest = s;
|
||||
//@dump-sem-ir-end
|
||||
@@ -155,8 +203,18 @@ import Cpp library "implicit_conversions.h";
|
||||
|
||||
fn ExplicitConstructorTest(s: Cpp.Source) {
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: fail_explicit.carbon:[[@LINE+3]]:36: error: cannot implicitly convert expression of type `Source` to `Cpp.ExplicitConstructor` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_explicit.carbon:[[@LINE+2]]:36: note: type `Cpp.Source` does not implement interface `Core.ImplicitAs(Cpp.ExplicitConstructor)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_explicit.carbon:[[@LINE+13]]:36
|
||||
// CHECK:STDERR: -> │ let _: Cpp.ExplicitConstructor = s;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert
|
||||
// CHECK:STDERR: · │ ┃ expression of type `Source` to
|
||||
// CHECK:STDERR: · │ ┃ `Cpp.ExplicitConstructor`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╭──────────────────────────────────╯
|
||||
// CHECK:STDERR: · │ type `Cpp.Source` does not implement interface
|
||||
// CHECK:STDERR: · │ `Core.ImplicitAs(Cpp.ExplicitConstructor)`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.ExplicitConstructor = s;
|
||||
//@dump-sem-ir-end
|
||||
@@ -164,8 +222,16 @@ fn ExplicitConstructorTest(s: Cpp.Source) {
|
||||
|
||||
fn ExplicitConversionTest(s: Cpp.ExplicitConversion) {
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: fail_explicit.carbon:[[@LINE+3]]:21: error: cannot implicitly convert expression of type `ExplicitConversion` to `Cpp.Dest` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_explicit.carbon:[[@LINE+2]]:21: note: type `Cpp.ExplicitConversion` does not implement interface `Core.ImplicitAs(Cpp.Dest)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_explicit.carbon:[[@LINE+11]]:21
|
||||
// CHECK:STDERR: -> │ let _: Cpp.Dest = s;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of type
|
||||
// CHECK:STDERR: · │ ┃ `ExplicitConversion` to `Cpp.Dest`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰────┤ type `Cpp.ExplicitConversion` does not implement
|
||||
// CHECK:STDERR: · │ interface `Core.ImplicitAs(Cpp.Dest)`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.Dest = s;
|
||||
//@dump-sem-ir-end
|
||||
@@ -191,9 +257,21 @@ import Cpp library "implicit_conversions.h";
|
||||
|
||||
fn IntConstructorTest(u: u32) {
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: fail_no_u32_to_int_conversion_in_carbon.carbon:[[@LINE+4]]:31: error: cannot implicitly convert expression of type `u32` to `i32` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_no_u32_to_int_conversion_in_carbon.carbon:[[@LINE+3]]:31: note: type `u32` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./implicit_conversions.h:38:21: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR: ╭─┤ fail_no_u32_to_int_conversion_in_carbon.carbon:[[@LINE+16]]:31
|
||||
// CHECK:STDERR: -> │ let _: Cpp.IntConstructor = u;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression
|
||||
// CHECK:STDERR: · │ ┃ of type `u32` to `i32`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰────┤ type `u32` does not implement interface
|
||||
// CHECK:STDERR: · │ `Core.ImplicitAs(i32)`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ┆
|
||||
// CHECK:STDERR: ├─┤ ./implicit_conversions.h
|
||||
// CHECK:STDERR: │ IntConstructor(int);
|
||||
// CHECK:STDERR: · ┬
|
||||
// CHECK:STDERR: · ╰──┤ initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.IntConstructor = u;
|
||||
//@dump-sem-ir-end
|
||||
@@ -263,16 +341,43 @@ import Cpp library "aggregate.h";
|
||||
|
||||
fn InitFromTuple() {
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: fail_todo_aggregate_from_tuple.carbon:[[@LINE+3]]:26-27: error: cannot implicitly convert expression of type `()` to `Cpp.Aggregate` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_aggregate_from_tuple.carbon:[[@LINE+2]]:26-27: note: type `()` does not implement interface `Core.ImplicitAs(Cpp.Aggregate)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_todo_aggregate_from_tuple.carbon:[[@LINE+11]]:26
|
||||
// CHECK:STDERR: -> │ let _: Cpp.Aggregate = ();
|
||||
// CHECK:STDERR: · ┳━
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of
|
||||
// CHECK:STDERR: · │ ┃ type `()` to `Cpp.Aggregate`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰────┤ type `()` does not implement interface
|
||||
// CHECK:STDERR: · │ `Core.ImplicitAs(Cpp.Aggregate)`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.Aggregate = ();
|
||||
// CHECK:STDERR: fail_todo_aggregate_from_tuple.carbon:[[@LINE+3]]:26-29: error: cannot implicitly convert expression of type `(Core.IntLiteral,)` to `Cpp.Aggregate` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_aggregate_from_tuple.carbon:[[@LINE+2]]:26-29: note: type `(Core.IntLiteral,)` does not implement interface `Core.ImplicitAs(Cpp.Aggregate)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_todo_aggregate_from_tuple.carbon:[[@LINE+12]]:26
|
||||
// CHECK:STDERR: -> │ let _: Cpp.Aggregate = (1,);
|
||||
// CHECK:STDERR: · ┳━━━
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of
|
||||
// CHECK:STDERR: · │ ┃ type `(Core.IntLiteral,)` to
|
||||
// CHECK:STDERR: · │ ┃ `Cpp.Aggregate`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰────┤ type `(Core.IntLiteral,)` does not implement
|
||||
// CHECK:STDERR: · │ interface `Core.ImplicitAs(Cpp.Aggregate)`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.Aggregate = (1,);
|
||||
// CHECK:STDERR: fail_todo_aggregate_from_tuple.carbon:[[@LINE+3]]:26-31: error: cannot implicitly convert expression of type `(Core.IntLiteral, Core.IntLiteral)` to `Cpp.Aggregate` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_aggregate_from_tuple.carbon:[[@LINE+2]]:26-31: note: type `(Core.IntLiteral, Core.IntLiteral)` does not implement interface `Core.ImplicitAs(Cpp.Aggregate)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_todo_aggregate_from_tuple.carbon:[[@LINE+13]]:26
|
||||
// CHECK:STDERR: -> │ let _: Cpp.Aggregate = (1, 2);
|
||||
// CHECK:STDERR: · ┳━━━━━
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of
|
||||
// CHECK:STDERR: · │ ┃ type `(Core.IntLiteral, Core.IntLiteral)`
|
||||
// CHECK:STDERR: · │ ┃ to `Cpp.Aggregate`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰────┤ type `(Core.IntLiteral, Core.IntLiteral)` does
|
||||
// CHECK:STDERR: · │ not implement interface
|
||||
// CHECK:STDERR: · │ `Core.ImplicitAs(Cpp.Aggregate)`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.Aggregate = (1, 2);
|
||||
//@dump-sem-ir-end
|
||||
@@ -286,16 +391,43 @@ import Cpp library "aggregate.h";
|
||||
|
||||
fn InitFromStruct() {
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: fail_todo_aggregate_from_struct.carbon:[[@LINE+3]]:26-27: error: cannot implicitly convert expression of type `{}` to `Cpp.Aggregate` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_aggregate_from_struct.carbon:[[@LINE+2]]:26-27: note: type `{}` does not implement interface `Core.ImplicitAs(Cpp.Aggregate)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_todo_aggregate_from_struct.carbon:[[@LINE+11]]:26
|
||||
// CHECK:STDERR: -> │ let _: Cpp.Aggregate = {};
|
||||
// CHECK:STDERR: · ┳━
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of
|
||||
// CHECK:STDERR: · │ ┃ type `{}` to `Cpp.Aggregate`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰────┤ type `{}` does not implement interface
|
||||
// CHECK:STDERR: · │ `Core.ImplicitAs(Cpp.Aggregate)`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.Aggregate = {};
|
||||
// CHECK:STDERR: fail_todo_aggregate_from_struct.carbon:[[@LINE+3]]:26-33: error: cannot implicitly convert expression of type `{.x: Core.IntLiteral}` to `Cpp.Aggregate` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_aggregate_from_struct.carbon:[[@LINE+2]]:26-33: note: type `{.x: Core.IntLiteral}` does not implement interface `Core.ImplicitAs(Cpp.Aggregate)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_todo_aggregate_from_struct.carbon:[[@LINE+12]]:26
|
||||
// CHECK:STDERR: -> │ let _: Cpp.Aggregate = {.x = 1};
|
||||
// CHECK:STDERR: · ┳━━━━━━━
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of
|
||||
// CHECK:STDERR: · │ ┃ type `{.x: Core.IntLiteral}` to
|
||||
// CHECK:STDERR: · │ ┃ `Cpp.Aggregate`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰────┤ type `{.x: Core.IntLiteral}` does not implement
|
||||
// CHECK:STDERR: · │ interface `Core.ImplicitAs(Cpp.Aggregate)`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.Aggregate = {.x = 1};
|
||||
// CHECK:STDERR: fail_todo_aggregate_from_struct.carbon:[[@LINE+3]]:26-41: error: cannot implicitly convert expression of type `{.x: Core.IntLiteral, .y: Core.IntLiteral}` to `Cpp.Aggregate` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_aggregate_from_struct.carbon:[[@LINE+2]]:26-41: note: type `{.x: Core.IntLiteral, .y: Core.IntLiteral}` does not implement interface `Core.ImplicitAs(Cpp.Aggregate)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_todo_aggregate_from_struct.carbon:[[@LINE+13]]:26
|
||||
// CHECK:STDERR: -> │ let _: Cpp.Aggregate = {.x = 1, .y = 2};
|
||||
// CHECK:STDERR: · ┳━━━━━━━━━━━━━━━
|
||||
// CHECK:STDERR: · ┏━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||
// CHECK:STDERR: · ┃ error: cannot implicitly convert expression of type
|
||||
// CHECK:STDERR: · ┃ `{.x: Core.IntLiteral, .y: Core.IntLiteral}` to `Cpp.Aggregate`
|
||||
// CHECK:STDERR: · ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰──┤ type `{.x: Core.IntLiteral, .y: Core.IntLiteral}`
|
||||
// CHECK:STDERR: · │ does not implement interface
|
||||
// CHECK:STDERR: · │ `Core.ImplicitAs(Cpp.Aggregate)`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.Aggregate = {.x = 1, .y = 2};
|
||||
//@dump-sem-ir-end
|
||||
@@ -323,16 +455,45 @@ import Cpp library "aggregate.h";
|
||||
|
||||
fn InitFromStruct() {
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: fail_non_aggregate_from_struct.carbon:[[@LINE+3]]:29-30: error: cannot implicitly convert expression of type `{}` to `Cpp.NonAggregate` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_non_aggregate_from_struct.carbon:[[@LINE+2]]:29-30: note: type `{}` does not implement interface `Core.ImplicitAs(Cpp.NonAggregate)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_non_aggregate_from_struct.carbon:[[@LINE+11]]:29
|
||||
// CHECK:STDERR: -> │ let _: Cpp.NonAggregate = {};
|
||||
// CHECK:STDERR: · ┳━
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of
|
||||
// CHECK:STDERR: · │ ┃ type `{}` to `Cpp.NonAggregate`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰────┤ type `{}` does not implement interface
|
||||
// CHECK:STDERR: · │ `Core.ImplicitAs(Cpp.NonAggregate)`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.NonAggregate = {};
|
||||
// CHECK:STDERR: fail_non_aggregate_from_struct.carbon:[[@LINE+3]]:29-36: error: cannot implicitly convert expression of type `{.x: Core.IntLiteral}` to `Cpp.NonAggregate` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_non_aggregate_from_struct.carbon:[[@LINE+2]]:29-36: note: type `{.x: Core.IntLiteral}` does not implement interface `Core.ImplicitAs(Cpp.NonAggregate)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_non_aggregate_from_struct.carbon:[[@LINE+13]]:29
|
||||
// CHECK:STDERR: -> │ let _: Cpp.NonAggregate = {.x = 1};
|
||||
// CHECK:STDERR: · ┳━━━━━━━
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot implicitly convert expression of
|
||||
// CHECK:STDERR: · │ ┃ type `{.x: Core.IntLiteral}` to
|
||||
// CHECK:STDERR: · │ ┃ `Cpp.NonAggregate`
|
||||
// CHECK:STDERR: · │ ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰────┤ type `{.x: Core.IntLiteral}` does not
|
||||
// CHECK:STDERR: · │ implement interface
|
||||
// CHECK:STDERR: · │ `Core.ImplicitAs(Cpp.NonAggregate)`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.NonAggregate = {.x = 1};
|
||||
// CHECK:STDERR: fail_non_aggregate_from_struct.carbon:[[@LINE+3]]:29-44: error: cannot implicitly convert expression of type `{.x: Core.IntLiteral, .y: Core.IntLiteral}` to `Cpp.NonAggregate` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_non_aggregate_from_struct.carbon:[[@LINE+2]]:29-44: note: type `{.x: Core.IntLiteral, .y: Core.IntLiteral}` does not implement interface `Core.ImplicitAs(Cpp.NonAggregate)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╭─┤ fail_non_aggregate_from_struct.carbon:[[@LINE+14]]:29
|
||||
// CHECK:STDERR: -> │ let _: Cpp.NonAggregate = {.x = 1, .y = 2};
|
||||
// CHECK:STDERR: · ┳━━━━━━━━━━━━━━━
|
||||
// CHECK:STDERR: · ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||
// CHECK:STDERR: · ┃ error: cannot implicitly convert expression of type
|
||||
// CHECK:STDERR: · ┃ `{.x: Core.IntLiteral, .y: Core.IntLiteral}` to `Cpp.NonAggregate`
|
||||
// CHECK:STDERR: · ┃ [ConversionFailure]
|
||||
// CHECK:STDERR: · ╰──┤ type
|
||||
// CHECK:STDERR: · │ `{.x: Core.IntLiteral, .y: Core.IntLiteral}`
|
||||
// CHECK:STDERR: · │ does not implement interface
|
||||
// CHECK:STDERR: · │ `Core.ImplicitAs(Cpp.NonAggregate)`
|
||||
// CHECK:STDERR: · │ [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let _: Cpp.NonAggregate = {.x = 1, .y = 2};
|
||||
//@dump-sem-ir-end
|
||||
@@ -519,9 +680,9 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: fn @NonConstConversionTest(%s.param: %NonConstConversion) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %s.ref: %NonConstConversion = name_ref s, %s
|
||||
// CHECK:STDOUT: %.loc11_21: %Dest.980 = converted %s.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc11_13: type = splice_block %Dest.ref [concrete = constants.%Dest.980] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %.loc19_21: %Dest.980 = converted %s.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc19_13: type = splice_block %Dest.ref [concrete = constants.%Dest.980] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %Dest.ref: type = name_ref Dest, imports.%Dest.decl [concrete = constants.%Dest.980]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_: %Dest.980 = wrapper_binding _, <error> [concrete = <error>]
|
||||
@@ -599,56 +760,56 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: fn @InaccessibleConstructorTest(%s.param: %Source) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %s.ref: %Source = name_ref s, %s
|
||||
// CHECK:STDOUT: %.loc11_40.1: ref %InaccessibleConstructor = temporary_storage
|
||||
// CHECK:STDOUT: %.loc11_40.2: ref %Source = value_as_ref %s.ref
|
||||
// CHECK:STDOUT: %addr.loc11_40.1: %ptr.5f6 = addr_of %.loc11_40.2
|
||||
// CHECK:STDOUT: %addr.loc11_40.2: %ptr.859 = addr_of %.loc11_40.1
|
||||
// CHECK:STDOUT: %InaccessibleConstructor__carbon_thunk.call: init %empty_tuple.type = call imports.%InaccessibleConstructor__carbon_thunk.decl(%addr.loc11_40.1, %addr.loc11_40.2)
|
||||
// CHECK:STDOUT: %.loc11_40.3: init %InaccessibleConstructor to %.loc11_40.1 = mark_in_place_init %InaccessibleConstructor__carbon_thunk.call
|
||||
// CHECK:STDOUT: %.loc11_40.4: init %InaccessibleConstructor = converted %s.ref, %.loc11_40.3
|
||||
// CHECK:STDOUT: %.loc11_40.5: ref %InaccessibleConstructor = temporary %.loc11_40.1, %.loc11_40.4
|
||||
// CHECK:STDOUT: %.loc11_40.6: %InaccessibleConstructor = acquire_value %.loc11_40.5
|
||||
// CHECK:STDOUT: %.loc11_13: type = splice_block %InaccessibleConstructor.ref [concrete = constants.%InaccessibleConstructor] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %.loc23_40.1: ref %InaccessibleConstructor = temporary_storage
|
||||
// CHECK:STDOUT: %.loc23_40.2: ref %Source = value_as_ref %s.ref
|
||||
// CHECK:STDOUT: %addr.loc23_40.1: %ptr.5f6 = addr_of %.loc23_40.2
|
||||
// CHECK:STDOUT: %addr.loc23_40.2: %ptr.859 = addr_of %.loc23_40.1
|
||||
// CHECK:STDOUT: %InaccessibleConstructor__carbon_thunk.call: init %empty_tuple.type = call imports.%InaccessibleConstructor__carbon_thunk.decl(%addr.loc23_40.1, %addr.loc23_40.2)
|
||||
// CHECK:STDOUT: %.loc23_40.3: init %InaccessibleConstructor to %.loc23_40.1 = mark_in_place_init %InaccessibleConstructor__carbon_thunk.call
|
||||
// CHECK:STDOUT: %.loc23_40.4: init %InaccessibleConstructor = converted %s.ref, %.loc23_40.3
|
||||
// CHECK:STDOUT: %.loc23_40.5: ref %InaccessibleConstructor = temporary %.loc23_40.1, %.loc23_40.4
|
||||
// CHECK:STDOUT: %.loc23_40.6: %InaccessibleConstructor = acquire_value %.loc23_40.5
|
||||
// CHECK:STDOUT: %.loc23_13: type = splice_block %InaccessibleConstructor.ref [concrete = constants.%InaccessibleConstructor] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc23: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %InaccessibleConstructor.ref: type = name_ref InaccessibleConstructor, imports.%InaccessibleConstructor.decl [concrete = constants.%InaccessibleConstructor]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_: %InaccessibleConstructor = wrapper_binding _, %.loc11_40.6
|
||||
// CHECK:STDOUT: %_: %InaccessibleConstructor = wrapper_binding _, %.loc23_40.6
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt: %pattern_type.824 = value_binding_pattern _ [concrete = constants.%_.patt.f1f]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Destroy.facet.loc11_40.1: %Destroy.type = facet_value constants.%InaccessibleConstructor, (constants.%DestroyImpl.impl_witness.8e4, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.8e3]
|
||||
// CHECK:STDOUT: %.loc11_40.7: %Destroy.type = converted constants.%InaccessibleConstructor, %Destroy.facet.loc11_40.1 [concrete = constants.%Destroy.facet.8e3]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc11_40.2: %Destroy.type = facet_value constants.%InaccessibleConstructor, (constants.%DestroyImpl.impl_witness.8e4, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.8e3]
|
||||
// CHECK:STDOUT: %.loc11_40.8: %Destroy.type = converted constants.%InaccessibleConstructor, %Destroy.facet.loc11_40.2 [concrete = constants.%Destroy.facet.8e3]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc23_40.1: %Destroy.type = facet_value constants.%InaccessibleConstructor, (constants.%DestroyImpl.impl_witness.8e4, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.8e3]
|
||||
// CHECK:STDOUT: %.loc23_40.7: %Destroy.type = converted constants.%InaccessibleConstructor, %Destroy.facet.loc23_40.1 [concrete = constants.%Destroy.facet.8e3]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc23_40.2: %Destroy.type = facet_value constants.%InaccessibleConstructor, (constants.%DestroyImpl.impl_witness.8e4, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.8e3]
|
||||
// CHECK:STDOUT: %.loc23_40.8: %Destroy.type = converted constants.%InaccessibleConstructor, %Destroy.facet.loc23_40.2 [concrete = constants.%Destroy.facet.8e3]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc11_40.5)
|
||||
// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc23_40.5)
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @InaccessibleConversionTest(%s.param: %InaccessibleConversion) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %s.ref: %InaccessibleConversion = name_ref s, %s
|
||||
// CHECK:STDOUT: %.loc20_21.1: ref %Dest = temporary_storage
|
||||
// CHECK:STDOUT: %addr: %ptr.ca8 = addr_of %.loc20_21.1
|
||||
// CHECK:STDOUT: %.loc42_21.1: ref %Dest = temporary_storage
|
||||
// CHECK:STDOUT: %addr: %ptr.ca8 = addr_of %.loc42_21.1
|
||||
// CHECK:STDOUT: %Dest__carbon_thunk.call: init %empty_tuple.type = call imports.%Dest__carbon_thunk.decl(%s.ref, %addr)
|
||||
// CHECK:STDOUT: %.loc20_21.2: init %Dest to %.loc20_21.1 = mark_in_place_init %Dest__carbon_thunk.call
|
||||
// CHECK:STDOUT: %.loc20_21.3: init %Dest = converted %s.ref, %.loc20_21.2
|
||||
// CHECK:STDOUT: %.loc20_21.4: ref %Dest = temporary %.loc20_21.1, %.loc20_21.3
|
||||
// CHECK:STDOUT: %.loc20_21.5: %Dest = acquire_value %.loc20_21.4
|
||||
// CHECK:STDOUT: %.loc20_13: type = splice_block %Dest.ref [concrete = constants.%Dest] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc20: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %.loc42_21.2: init %Dest to %.loc42_21.1 = mark_in_place_init %Dest__carbon_thunk.call
|
||||
// CHECK:STDOUT: %.loc42_21.3: init %Dest = converted %s.ref, %.loc42_21.2
|
||||
// CHECK:STDOUT: %.loc42_21.4: ref %Dest = temporary %.loc42_21.1, %.loc42_21.3
|
||||
// CHECK:STDOUT: %.loc42_21.5: %Dest = acquire_value %.loc42_21.4
|
||||
// CHECK:STDOUT: %.loc42_13: type = splice_block %Dest.ref [concrete = constants.%Dest] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc42: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %Dest.ref: type = name_ref Dest, imports.%Dest.decl [concrete = constants.%Dest]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_: %Dest = wrapper_binding _, %.loc20_21.5
|
||||
// CHECK:STDOUT: %_: %Dest = wrapper_binding _, %.loc42_21.5
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt: %pattern_type.b72 = value_binding_pattern _ [concrete = constants.%_.patt.664]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Destroy.facet.loc20_21.1: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.2) [concrete = constants.%Destroy.facet.bbf]
|
||||
// CHECK:STDOUT: %.loc20_21.6: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc20_21.1 [concrete = constants.%Destroy.facet.bbf]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc20_21.2: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.2) [concrete = constants.%Destroy.facet.bbf]
|
||||
// CHECK:STDOUT: %.loc20_21.7: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc20_21.2 [concrete = constants.%Destroy.facet.bbf]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc42_21.1: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.2) [concrete = constants.%Destroy.facet.bbf]
|
||||
// CHECK:STDOUT: %.loc42_21.6: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc42_21.1 [concrete = constants.%Destroy.facet.bbf]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc42_21.2: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.2) [concrete = constants.%Destroy.facet.bbf]
|
||||
// CHECK:STDOUT: %.loc42_21.7: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc42_21.2 [concrete = constants.%Destroy.facet.bbf]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc20_21.4)
|
||||
// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc42_21.4)
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -683,9 +844,9 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: fn @DeletedConstructorTest(%s.param: %Source) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %s.ref: %Source = name_ref s, %s
|
||||
// CHECK:STDOUT: %.loc11_35: %DeletedConstructor = converted %s.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc11_13: type = splice_block %DeletedConstructor.ref [concrete = constants.%DeletedConstructor] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %.loc21_35: %DeletedConstructor = converted %s.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc21_13: type = splice_block %DeletedConstructor.ref [concrete = constants.%DeletedConstructor] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %DeletedConstructor.ref: type = name_ref DeletedConstructor, imports.%DeletedConstructor.decl [concrete = constants.%DeletedConstructor]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_: %DeletedConstructor = wrapper_binding _, <error> [concrete = <error>]
|
||||
@@ -698,9 +859,9 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: fn @DeletedConversionTest(%s.param: %DeletedConversion) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %s.ref: %DeletedConversion = name_ref s, %s
|
||||
// CHECK:STDOUT: %.loc20_21: %Dest.980 = converted %s.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc20_13: type = splice_block %Dest.ref [concrete = constants.%Dest.980] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc20: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %.loc38_21: %Dest.980 = converted %s.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc38_13: type = splice_block %Dest.ref [concrete = constants.%Dest.980] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc38: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %Dest.ref: type = name_ref Dest, imports.%Dest.decl [concrete = constants.%Dest.980]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_: %Dest.980 = wrapper_binding _, <error> [concrete = <error>]
|
||||
@@ -741,9 +902,9 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: fn @ExplicitConstructorTest(%s.param: %Source) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %s.ref: %Source = name_ref s, %s
|
||||
// CHECK:STDOUT: %.loc11_36: %ExplicitConstructor = converted %s.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc11_13: type = splice_block %ExplicitConstructor.ref [concrete = constants.%ExplicitConstructor] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %.loc21_36: %ExplicitConstructor = converted %s.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc21_13: type = splice_block %ExplicitConstructor.ref [concrete = constants.%ExplicitConstructor] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %ExplicitConstructor.ref: type = name_ref ExplicitConstructor, imports.%ExplicitConstructor.decl [concrete = constants.%ExplicitConstructor]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_: %ExplicitConstructor = wrapper_binding _, <error> [concrete = <error>]
|
||||
@@ -756,9 +917,9 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: fn @ExplicitConversionTest(%s.param: %ExplicitConversion) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %s.ref: %ExplicitConversion = name_ref s, %s
|
||||
// CHECK:STDOUT: %.loc20_21: %Dest.980 = converted %s.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc20_13: type = splice_block %Dest.ref [concrete = constants.%Dest.980] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc20: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %.loc38_21: %Dest.980 = converted %s.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc38_13: type = splice_block %Dest.ref [concrete = constants.%Dest.980] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc38: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %Dest.ref: type = name_ref Dest, imports.%Dest.decl [concrete = constants.%Dest.980]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_: %Dest.980 = wrapper_binding _, <error> [concrete = <error>]
|
||||
@@ -881,28 +1042,28 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: fn @IntConstructorTest(%u.param: %u32) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %u.ref: %u32 = name_ref u, %u
|
||||
// CHECK:STDOUT: %.loc12_31.1: ref %IntConstructor = temporary_storage
|
||||
// CHECK:STDOUT: %.loc12_31.2: %i32 = converted %u.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %addr: %ptr.100 = addr_of %.loc12_31.1
|
||||
// CHECK:STDOUT: %.loc24_31.1: ref %IntConstructor = temporary_storage
|
||||
// CHECK:STDOUT: %.loc24_31.2: %i32 = converted %u.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %addr: %ptr.100 = addr_of %.loc24_31.1
|
||||
// CHECK:STDOUT: %IntConstructor__carbon_thunk.call: init %empty_tuple.type = call imports.%IntConstructor__carbon_thunk.decl(<error>, %addr)
|
||||
// CHECK:STDOUT: %.loc12_31.3: init %IntConstructor to %.loc12_31.1 = mark_in_place_init %IntConstructor__carbon_thunk.call
|
||||
// CHECK:STDOUT: %.loc12_31.4: init %IntConstructor = converted %u.ref, %.loc12_31.3
|
||||
// CHECK:STDOUT: %.loc12_31.5: ref %IntConstructor = temporary %.loc12_31.1, %.loc12_31.4
|
||||
// CHECK:STDOUT: %.loc12_31.6: %IntConstructor = acquire_value %.loc12_31.5
|
||||
// CHECK:STDOUT: %.loc12_13: type = splice_block %IntConstructor.ref [concrete = constants.%IntConstructor] {
|
||||
// CHECK:STDOUT: %.loc24_31.3: init %IntConstructor to %.loc24_31.1 = mark_in_place_init %IntConstructor__carbon_thunk.call
|
||||
// CHECK:STDOUT: %.loc24_31.4: init %IntConstructor = converted %u.ref, %.loc24_31.3
|
||||
// CHECK:STDOUT: %.loc24_31.5: ref %IntConstructor = temporary %.loc24_31.1, %.loc24_31.4
|
||||
// CHECK:STDOUT: %.loc24_31.6: %IntConstructor = acquire_value %.loc24_31.5
|
||||
// CHECK:STDOUT: %.loc24_13: type = splice_block %IntConstructor.ref [concrete = constants.%IntConstructor] {
|
||||
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %IntConstructor.ref: type = name_ref IntConstructor, imports.%IntConstructor.decl [concrete = constants.%IntConstructor]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_: %IntConstructor = wrapper_binding _, %.loc12_31.6
|
||||
// CHECK:STDOUT: %_: %IntConstructor = wrapper_binding _, %.loc24_31.6
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt: %pattern_type.c4e = value_binding_pattern _ [concrete = constants.%_.patt.151]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Destroy.facet.loc12_31.1: %Destroy.type = facet_value constants.%IntConstructor, (constants.%DestroyImpl.impl_witness.1d9, constants.%custom_witness.576) [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %.loc12_31.7: %Destroy.type = converted constants.%IntConstructor, %Destroy.facet.loc12_31.1 [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc12_31.2: %Destroy.type = facet_value constants.%IntConstructor, (constants.%DestroyImpl.impl_witness.1d9, constants.%custom_witness.576) [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %.loc12_31.8: %Destroy.type = converted constants.%IntConstructor, %Destroy.facet.loc12_31.2 [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc24_31.1: %Destroy.type = facet_value constants.%IntConstructor, (constants.%DestroyImpl.impl_witness.1d9, constants.%custom_witness.576) [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %.loc24_31.7: %Destroy.type = converted constants.%IntConstructor, %Destroy.facet.loc24_31.1 [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc24_31.2: %Destroy.type = facet_value constants.%IntConstructor, (constants.%DestroyImpl.impl_witness.1d9, constants.%custom_witness.576) [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %.loc24_31.8: %Destroy.type = converted constants.%IntConstructor, %Destroy.facet.loc24_31.2 [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc12_31.5)
|
||||
// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc24_31.5)
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1223,31 +1384,8 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @InitFromTuple() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_27.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc11_27.2: %Aggregate = converted %.loc11_27.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc11_13: type = splice_block %Aggregate.ref.loc11 [concrete = constants.%Aggregate] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %Aggregate.ref.loc11: type = name_ref Aggregate, imports.%Aggregate.decl [concrete = constants.%Aggregate]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc11: %Aggregate = wrapper_binding _, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc11: %pattern_type.5dc = value_binding_pattern _ [concrete = constants.%_.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %.loc15_29.1: %tuple.type.985 = tuple_literal (%int_1.loc15) [concrete = constants.%tuple.378]
|
||||
// CHECK:STDOUT: %.loc15_29.2: %Aggregate = converted %.loc15_29.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc15_13: type = splice_block %Aggregate.ref.loc15 [concrete = constants.%Aggregate] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %Aggregate.ref.loc15: type = name_ref Aggregate, imports.%Aggregate.decl [concrete = constants.%Aggregate]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc15: %Aggregate = wrapper_binding _, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc15: %pattern_type.5dc = value_binding_pattern _ [concrete = constants.%_.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
|
||||
// CHECK:STDOUT: %.loc19_31.1: %tuple.type.f94 = tuple_literal (%int_1.loc19, %int_2) [concrete = constants.%tuple.ad8]
|
||||
// CHECK:STDOUT: %.loc19_31.2: %Aggregate = converted %.loc19_31.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc19_27.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc19_27.2: %Aggregate = converted %.loc19_27.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc19_13: type = splice_block %Aggregate.ref.loc19 [concrete = constants.%Aggregate] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %Aggregate.ref.loc19: type = name_ref Aggregate, imports.%Aggregate.decl [concrete = constants.%Aggregate]
|
||||
@@ -1256,6 +1394,29 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc19: %pattern_type.5dc = value_binding_pattern _ [concrete = constants.%_.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_1.loc32: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %.loc32_29.1: %tuple.type.985 = tuple_literal (%int_1.loc32) [concrete = constants.%tuple.378]
|
||||
// CHECK:STDOUT: %.loc32_29.2: %Aggregate = converted %.loc32_29.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc32_13: type = splice_block %Aggregate.ref.loc32 [concrete = constants.%Aggregate] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc32: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %Aggregate.ref.loc32: type = name_ref Aggregate, imports.%Aggregate.decl [concrete = constants.%Aggregate]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc32: %Aggregate = wrapper_binding _, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc32: %pattern_type.5dc = value_binding_pattern _ [concrete = constants.%_.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_1.loc46: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
|
||||
// CHECK:STDOUT: %.loc46_31.1: %tuple.type.f94 = tuple_literal (%int_1.loc46, %int_2) [concrete = constants.%tuple.ad8]
|
||||
// CHECK:STDOUT: %.loc46_31.2: %Aggregate = converted %.loc46_31.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc46_13: type = splice_block %Aggregate.ref.loc46 [concrete = constants.%Aggregate] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc46: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %Aggregate.ref.loc46: type = name_ref Aggregate, imports.%Aggregate.decl [concrete = constants.%Aggregate]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc46: %Aggregate = wrapper_binding _, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc46: %pattern_type.5dc = value_binding_pattern _ [concrete = constants.%_.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1286,31 +1447,8 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @InitFromStruct() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_27.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc11_27.2: %Aggregate = converted %.loc11_27.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc11_13: type = splice_block %Aggregate.ref.loc11 [concrete = constants.%Aggregate] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %Aggregate.ref.loc11: type = name_ref Aggregate, imports.%Aggregate.decl [concrete = constants.%Aggregate]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc11: %Aggregate = wrapper_binding _, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc11: %pattern_type.5dc = value_binding_pattern _ [concrete = constants.%_.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %.loc15_33.1: %struct_type.x = struct_literal (%int_1.loc15) [concrete = constants.%struct.147]
|
||||
// CHECK:STDOUT: %.loc15_33.2: %Aggregate = converted %.loc15_33.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc15_13: type = splice_block %Aggregate.ref.loc15 [concrete = constants.%Aggregate] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %Aggregate.ref.loc15: type = name_ref Aggregate, imports.%Aggregate.decl [concrete = constants.%Aggregate]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc15: %Aggregate = wrapper_binding _, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc15: %pattern_type.5dc = value_binding_pattern _ [concrete = constants.%_.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
|
||||
// CHECK:STDOUT: %.loc19_41.1: %struct_type.x.y = struct_literal (%int_1.loc19, %int_2) [concrete = constants.%struct.004]
|
||||
// CHECK:STDOUT: %.loc19_41.2: %Aggregate = converted %.loc19_41.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc19_27.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc19_27.2: %Aggregate = converted %.loc19_27.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc19_13: type = splice_block %Aggregate.ref.loc19 [concrete = constants.%Aggregate] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %Aggregate.ref.loc19: type = name_ref Aggregate, imports.%Aggregate.decl [concrete = constants.%Aggregate]
|
||||
@@ -1319,6 +1457,29 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc19: %pattern_type.5dc = value_binding_pattern _ [concrete = constants.%_.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_1.loc32: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %.loc32_33.1: %struct_type.x = struct_literal (%int_1.loc32) [concrete = constants.%struct.147]
|
||||
// CHECK:STDOUT: %.loc32_33.2: %Aggregate = converted %.loc32_33.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc32_13: type = splice_block %Aggregate.ref.loc32 [concrete = constants.%Aggregate] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc32: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %Aggregate.ref.loc32: type = name_ref Aggregate, imports.%Aggregate.decl [concrete = constants.%Aggregate]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc32: %Aggregate = wrapper_binding _, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc32: %pattern_type.5dc = value_binding_pattern _ [concrete = constants.%_.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_1.loc46: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
|
||||
// CHECK:STDOUT: %.loc46_41.1: %struct_type.x.y = struct_literal (%int_1.loc46, %int_2) [concrete = constants.%struct.004]
|
||||
// CHECK:STDOUT: %.loc46_41.2: %Aggregate = converted %.loc46_41.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc46_13: type = splice_block %Aggregate.ref.loc46 [concrete = constants.%Aggregate] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc46: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %Aggregate.ref.loc46: type = name_ref Aggregate, imports.%Aggregate.decl [concrete = constants.%Aggregate]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc46: %Aggregate = wrapper_binding _, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc46: %pattern_type.5dc = value_binding_pattern _ [concrete = constants.%_.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1525,31 +1686,8 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @InitFromStruct() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc11_30.2: %NonAggregate = converted %.loc11_30.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc11_13: type = splice_block %NonAggregate.ref.loc11 [concrete = constants.%NonAggregate] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %NonAggregate.ref.loc11: type = name_ref NonAggregate, imports.%NonAggregate.decl [concrete = constants.%NonAggregate]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc11: %NonAggregate = wrapper_binding _, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc11: %pattern_type.273 = value_binding_pattern _ [concrete = constants.%_.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %.loc15_36.1: %struct_type.x = struct_literal (%int_1.loc15) [concrete = constants.%struct.147]
|
||||
// CHECK:STDOUT: %.loc15_36.2: %NonAggregate = converted %.loc15_36.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc15_13: type = splice_block %NonAggregate.ref.loc15 [concrete = constants.%NonAggregate] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %NonAggregate.ref.loc15: type = name_ref NonAggregate, imports.%NonAggregate.decl [concrete = constants.%NonAggregate]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc15: %NonAggregate = wrapper_binding _, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc15: %pattern_type.273 = value_binding_pattern _ [concrete = constants.%_.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
|
||||
// CHECK:STDOUT: %.loc19_44.1: %struct_type.x.y = struct_literal (%int_1.loc19, %int_2) [concrete = constants.%struct.004]
|
||||
// CHECK:STDOUT: %.loc19_44.2: %NonAggregate = converted %.loc19_44.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc19_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc19_30.2: %NonAggregate = converted %.loc19_30.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc19_13: type = splice_block %NonAggregate.ref.loc19 [concrete = constants.%NonAggregate] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %NonAggregate.ref.loc19: type = name_ref NonAggregate, imports.%NonAggregate.decl [concrete = constants.%NonAggregate]
|
||||
@@ -1558,6 +1696,29 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc19: %pattern_type.273 = value_binding_pattern _ [concrete = constants.%_.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_1.loc33: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %.loc33_36.1: %struct_type.x = struct_literal (%int_1.loc33) [concrete = constants.%struct.147]
|
||||
// CHECK:STDOUT: %.loc33_36.2: %NonAggregate = converted %.loc33_36.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc33_13: type = splice_block %NonAggregate.ref.loc33 [concrete = constants.%NonAggregate] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc33: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %NonAggregate.ref.loc33: type = name_ref NonAggregate, imports.%NonAggregate.decl [concrete = constants.%NonAggregate]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc33: %NonAggregate = wrapper_binding _, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc33: %pattern_type.273 = value_binding_pattern _ [concrete = constants.%_.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_1.loc48: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
|
||||
// CHECK:STDOUT: %.loc48_44.1: %struct_type.x.y = struct_literal (%int_1.loc48, %int_2) [concrete = constants.%struct.004]
|
||||
// CHECK:STDOUT: %.loc48_44.2: %NonAggregate = converted %.loc48_44.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc48_13: type = splice_block %NonAggregate.ref.loc48 [concrete = constants.%NonAggregate] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc48: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %NonAggregate.ref.loc48: type = name_ref NonAggregate, imports.%NonAggregate.decl [concrete = constants.%NonAggregate]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc48: %NonAggregate = wrapper_binding _, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc48: %pattern_type.273 = value_binding_pattern _ [concrete = constants.%_.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
Reference in new issue
Block a user