mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 08:48:13 +00:00
Rework the initial terminal rendering into the form the design landed on (#7994)
There were a number of iterations on the design that weren't reflected in the initial port to the terminal rendering library. This PR tries to complete the rendering side of things to match the design we landed on: code-focused, with messages attached by lines to the code, and condensed as much as possible to avoid the vertical space. It also improves the styling to make things more visually distinguishable such as adding a `->` to the main error line, and making the underlines and connectors for it have a heavy weight (when the font supports that). Another major change is having multiple messages on a single line be drawn in source lexical order. This requires the connectors to cross without joining, but makes it easier to read the messages. This PR also has some refactorings to enable these improvements, and a _number_ of improvements to comment prose and terminology to try and avoid jargon and make things read more naturally. Sorry for the fact that Claude left a bunch of this mannerly language in comments despite my efforts, but I'm continuing to try and drive the prose towards something direct and simple to read. Some of the terminology improvements also needed to be made in the design doc and those have been made here. Note that I don't think this rendering is perfect or should be viewed as final. I'm happy to iterate on it further, and have a few adjustments in mind already, but would like to focus this on getting the _implementation_ of the current rendering design in place, and then we can make targeted changes or tweaks as needed. For example, I'm not yet fully happy with the rendering when messages are too long and we move them all the way to the left, but am leaving that for a follow-up. Assisted-by: Claude Code
This commit is contained in:
1 parent
5a614167c2
commit
c608c35e12
79 files changed
+3110
-2567
No files matched your search
+4
-7
@@ -234,8 +234,7 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "short_param.h";
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_import_short_param_overflow_max.carbon:[[@LINE+4]]:11-16: error: integer value 32768 too large for type `i16` [IntTooLargeForType]
|
||||
// CHECK:STDERR: included from: fail_import_short_param_overflow_max.carbon:[[@LINE-4]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_import_short_param_overflow_max.carbon:[[@LINE+3]]:11-16: error: integer value 32768 too large for type `i16` [IntTooLargeForType]
|
||||
// CHECK:STDERR: ./short_param.h:2:16: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.foo(0x8000);
|
||||
@@ -260,8 +259,7 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "short_param.h";
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_import_short_param_overflow_min.carbon:[[@LINE+4]]:11-17: error: integer value -32769 too large for type `i16` [IntTooLargeForType]
|
||||
// CHECK:STDERR: included from: fail_import_short_param_overflow_min.carbon:[[@LINE-4]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_import_short_param_overflow_min.carbon:[[@LINE+3]]:11-17: error: integer value -32769 too large for type `i16` [IntTooLargeForType]
|
||||
// CHECK:STDERR: ./short_param.h:2:16: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.foo(-0x8001);
|
||||
@@ -274,9 +272,8 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "short_param.h";
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_import_short_param_int32_arg.carbon:[[@LINE+5]]:11-18: error: cannot implicitly convert expression of type `i32` to `i16` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_import_short_param_int32_arg.carbon:[[@LINE+4]]:11-18: note: type `i32` does not implement interface `Core.ImplicitAs(i16)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_import_short_param_int32_arg.carbon:[[@LINE-5]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_import_short_param_int32_arg.carbon:[[@LINE+4]]:11-18: error: cannot implicitly convert expression of type `i32` to `i16` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_import_short_param_int32_arg.carbon:[[@LINE+3]]:11-18: note: type `i32` does not implement interface `Core.ImplicitAs(i16)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./short_param.h:2:16: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.foo(1 as i32);
|
||||
|
||||
+4
-8
@@ -54,8 +54,7 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "int_param.h";
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_import_int_param_overflow_max.carbon:[[@LINE+4]]:11-21: error: integer value 2147483648 too large for type `i32` [IntTooLargeForType]
|
||||
// CHECK:STDERR: included from: fail_import_int_param_overflow_max.carbon:[[@LINE-4]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_import_int_param_overflow_max.carbon:[[@LINE+3]]:11-21: error: integer value 2147483648 too large for type `i32` [IntTooLargeForType]
|
||||
// CHECK:STDERR: ./int_param.h:2:14: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.foo(0x8000_0000);
|
||||
@@ -80,8 +79,7 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "int_param.h";
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_import_int_param_overflow_min.carbon:[[@LINE+4]]:11-22: error: integer value -2147483649 too large for type `i32` [IntTooLargeForType]
|
||||
// CHECK:STDERR: included from: fail_import_int_param_overflow_min.carbon:[[@LINE-4]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_import_int_param_overflow_min.carbon:[[@LINE+3]]:11-22: error: integer value -2147483649 too large for type `i32` [IntTooLargeForType]
|
||||
// CHECK:STDERR: ./int_param.h:2:14: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.foo(-0x8000_0001);
|
||||
@@ -156,16 +154,14 @@ import Cpp library "unsigned_int_param.h";
|
||||
fn F() {
|
||||
Cpp.foo(0);
|
||||
|
||||
// CHECK:STDERR: fail_import_unsigned_int_param_overflow.carbon:[[@LINE+4]]:11-12: error: negative integer value -1 converted to unsigned type `u32` [NegativeIntInUnsignedType]
|
||||
// CHECK:STDERR: included from: fail_import_unsigned_int_param_overflow.carbon:[[@LINE-6]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_import_unsigned_int_param_overflow.carbon:[[@LINE+3]]:11-12: error: negative integer value -1 converted to unsigned type `u32` [NegativeIntInUnsignedType]
|
||||
// CHECK:STDERR: ./unsigned_int_param.h:2:23: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.foo(-1);
|
||||
|
||||
Cpp.foo(0x0_FFFF_FFFF);
|
||||
|
||||
// CHECK:STDERR: fail_import_unsigned_int_param_overflow.carbon:[[@LINE+4]]:11-23: error: integer value 4294967296 too large for type `u32` [IntTooLargeForType]
|
||||
// CHECK:STDERR: included from: fail_import_unsigned_int_param_overflow.carbon:[[@LINE-14]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_import_unsigned_int_param_overflow.carbon:[[@LINE+3]]:11-23: error: integer value 4294967296 too large for type `u32` [IntTooLargeForType]
|
||||
// CHECK:STDERR: ./unsigned_int_param.h:2:23: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.foo(0x1_0000_0000);
|
||||
|
||||
+16
-18
@@ -51,16 +51,14 @@ fn F() {
|
||||
Cpp.TakesFunction(Cpp.Function);
|
||||
|
||||
var n: array(i32, 42);
|
||||
// CHECK:STDERR: fail_todo_call_params_2.carbon:[[@LINE+5]]:3-19: error: no matching function for call to 'TakesFunction' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_todo_call_params_2.carbon:[[@LINE-12]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_todo_call_params_2.carbon:[[@LINE+4]]:3-19: error: no matching function for call to 'TakesFunction' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./params.h:3:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./params.h:3:20-29: note: no known conversion from 'int * _Nonnull' to 'int (*)(int)' for 1st argument [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
Cpp.TakesFunction(&n[0]);
|
||||
|
||||
// CHECK:STDERR: fail_todo_call_params_2.carbon:[[@LINE+5]]:21-31: error: cannot implicitly convert expression of type `Cpp.nullptr_t` to `<C++ type int (*)(int)>` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_call_params_2.carbon:[[@LINE+4]]:21-31: note: type `Cpp.nullptr_t` does not implement interface `Core.ImplicitAs(<C++ type int (*)(int)>)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_todo_call_params_2.carbon:[[@LINE-20]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_todo_call_params_2.carbon:[[@LINE+4]]:21-31: error: cannot implicitly convert expression of type `Cpp.nullptr_t` to `<C++ type int (*)(int)>` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_call_params_2.carbon:[[@LINE+3]]:21-31: note: type `Cpp.nullptr_t` does not implement interface `Core.ImplicitAs(<C++ type int (*)(int)>)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./params.h:3:24: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.TakesFunction(Cpp.nullptr);
|
||||
@@ -876,25 +874,25 @@ fn F() {
|
||||
// CHECK:STDOUT: %n.patt: %pattern_type.9c3 = ref_binding_pattern n [concrete = constants.%n.patt.368]
|
||||
// CHECK:STDOUT: %n.var_patt: %pattern_type.9c3 = var_pattern %n.patt [concrete = constants.%n.var_patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Cpp.ref.loc20: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesFunction.ref.loc20: %TakesFunction.cpp_overload_set.type = name_ref TakesFunction, imports.%TakesFunction.cpp_overload_set.value [concrete = constants.%TakesFunction.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesFunction.ref.loc19: %TakesFunction.cpp_overload_set.type = name_ref TakesFunction, imports.%TakesFunction.cpp_overload_set.value [concrete = constants.%TakesFunction.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %n.ref: ref %Array.3b5 = name_ref n, %n
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
|
||||
// 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.loc20_24.1: <bound method> = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %bound_method.loc19_24.1: <bound method> = bound_method %int_0, %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.loc20_24.2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc20_24.2(%int_0) [concrete = constants.%int_0.753]
|
||||
// CHECK:STDOUT: %.loc20_24.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753]
|
||||
// CHECK:STDOUT: %.loc20_24.2: %i32 = converted %int_0, %.loc20_24.1 [concrete = constants.%int_0.753]
|
||||
// CHECK:STDOUT: %.loc20_25: ref %i32 = array_index %n.ref, %.loc20_24.2
|
||||
// CHECK:STDOUT: %addr: %ptr.a17 = addr_of %.loc20_25
|
||||
// CHECK:STDOUT: %Cpp.ref.loc27_3: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesFunction.ref.loc27: %TakesFunction.cpp_overload_set.type = name_ref TakesFunction, imports.%TakesFunction.cpp_overload_set.value [concrete = constants.%TakesFunction.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc27_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %bound_method.loc19_24.2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc19_24.2(%int_0) [concrete = constants.%int_0.753]
|
||||
// CHECK:STDOUT: %.loc19_24.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753]
|
||||
// CHECK:STDOUT: %.loc19_24.2: %i32 = converted %int_0, %.loc19_24.1 [concrete = constants.%int_0.753]
|
||||
// CHECK:STDOUT: %.loc19_25: ref %i32 = array_index %n.ref, %.loc19_24.2
|
||||
// CHECK:STDOUT: %addr: %ptr.a17 = addr_of %.loc19_25
|
||||
// CHECK:STDOUT: %Cpp.ref.loc25_3: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesFunction.ref.loc25: %TakesFunction.cpp_overload_set.type = name_ref TakesFunction, imports.%TakesFunction.cpp_overload_set.value [concrete = constants.%TakesFunction.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc25_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %nullptr.ref: %Cpp.nullptr_t = name_ref nullptr, %uninit [concrete = constants.%uninit]
|
||||
// CHECK:STDOUT: %.loc27: %.659 = converted %nullptr.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc25: %.659 = converted %nullptr.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %TakesFunction.call: init %empty_tuple.type = call imports.%TakesFunction.decl(<error>)
|
||||
// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%Array.3b5, (constants.%DestroyImpl.impl_witness.be3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.843]
|
||||
// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%Array.3b5, %Destroy.facet.loc14_3.1 [concrete = constants.%Destroy.facet.843]
|
||||
|
||||
@@ -63,50 +63,43 @@ import Cpp library "functions.h";
|
||||
|
||||
fn Call() {
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+5]]:3-20: error: no matching function for call to 'GlobalNoReturn' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_call_too_few_args.carbon:[[@LINE-5]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+4]]:3-20: error: no matching function for call to 'GlobalNoReturn' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./functions.h:2:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./functions.h:2:21-54: note: requires at least 2 arguments, but 1 was provided [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
Cpp.GlobalNoReturn(1);
|
||||
|
||||
// CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+5]]:3-20: error: no matching function for call to 'GlobalNoReturn' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_call_too_few_args.carbon:[[@LINE-12]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+4]]:3-20: error: no matching function for call to 'GlobalNoReturn' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./functions.h:2:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./functions.h:2:21-54: note: requires at least 2 arguments, but 0 were provided [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
Cpp.GlobalNoReturn();
|
||||
|
||||
// CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+5]]:3-21: error: no matching function for call to 'GlobalReturnInt' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_call_too_few_args.carbon:[[@LINE-19]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+4]]:3-21: error: no matching function for call to 'GlobalReturnInt' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./functions.h:3:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./functions.h:3:22-55: note: requires at least 2 arguments, but 1 was provided [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
Cpp.GlobalReturnInt(1);
|
||||
|
||||
// CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+5]]:3-21: error: no matching function for call to 'GlobalReturnInt' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_call_too_few_args.carbon:[[@LINE-26]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+4]]:3-21: error: no matching function for call to 'GlobalReturnInt' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./functions.h:3:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./functions.h:3:22-55: note: requires at least 2 arguments, but 0 were provided [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
Cpp.GlobalReturnInt();
|
||||
|
||||
// CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+5]]:3-17: error: no matching function for call to 'B' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_call_too_few_args.carbon:[[@LINE-33]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+4]]:3-17: error: no matching function for call to 'B' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./functions.h:6:8: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./functions.h:6:10-25: note: requires at least argument 'a', but no arguments were provided [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
({} as Cpp.X).B();
|
||||
|
||||
// CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+5]]:3-9: error: no matching function for call to 'C' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_call_too_few_args.carbon:[[@LINE-40]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+4]]:3-9: error: no matching function for call to 'C' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./functions.h:7:15: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./functions.h:7:17-32: note: requires at least argument 'a', but no arguments were provided [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
Cpp.X.C();
|
||||
|
||||
// CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+5]]:3-17: error: no matching function for call to 'D' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_call_too_few_args.carbon:[[@LINE-47]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+4]]:3-17: error: no matching function for call to 'D' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./functions.h:8:8: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./functions.h:8:10-33: note: requires at least non-object argument 'a', but no arguments were provided [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
@@ -928,49 +921,49 @@ fn Call() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Call() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Cpp.ref.loc13: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %GlobalNoReturn.ref.loc13: %GlobalNoReturn.cpp_overload_set.type = name_ref GlobalNoReturn, imports.%GlobalNoReturn.cpp_overload_set.value [concrete = constants.%GlobalNoReturn.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc20: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %GlobalNoReturn.ref.loc20: %GlobalNoReturn.cpp_overload_set.type = name_ref GlobalNoReturn, imports.%GlobalNoReturn.cpp_overload_set.value [concrete = constants.%GlobalNoReturn.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc27: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %GlobalReturnInt.ref.loc27: %GlobalReturnInt.cpp_overload_set.type = name_ref GlobalReturnInt, imports.%GlobalReturnInt.cpp_overload_set.value [concrete = constants.%GlobalReturnInt.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %int_1.loc27: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc34: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %GlobalReturnInt.ref.loc34: %GlobalReturnInt.cpp_overload_set.type = name_ref GlobalReturnInt, imports.%GlobalReturnInt.cpp_overload_set.value [concrete = constants.%GlobalReturnInt.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %.loc41_5.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc41: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %X.ref.loc41: type = name_ref X, imports.%X.decl [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %.loc41_5.2: ref %X = temporary_storage
|
||||
// CHECK:STDOUT: %.loc41_5.3: init %X to %.loc41_5.2 = class_init () [concrete = constants.%X.val]
|
||||
// CHECK:STDOUT: %.loc41_7.1: init %X = converted %.loc41_5.1, %.loc41_5.3 [concrete = constants.%X.val]
|
||||
// CHECK:STDOUT: %.loc41_7.2: ref %X = temporary %.loc41_5.2, %.loc41_7.1 [concrete = constants.%.414]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %GlobalNoReturn.ref.loc12: %GlobalNoReturn.cpp_overload_set.type = name_ref GlobalNoReturn, imports.%GlobalNoReturn.cpp_overload_set.value [concrete = constants.%GlobalNoReturn.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %GlobalNoReturn.ref.loc18: %GlobalNoReturn.cpp_overload_set.type = name_ref GlobalNoReturn, imports.%GlobalNoReturn.cpp_overload_set.value [concrete = constants.%GlobalNoReturn.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %GlobalReturnInt.ref.loc24: %GlobalReturnInt.cpp_overload_set.type = name_ref GlobalReturnInt, imports.%GlobalReturnInt.cpp_overload_set.value [concrete = constants.%GlobalReturnInt.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc30: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %GlobalReturnInt.ref.loc30: %GlobalReturnInt.cpp_overload_set.type = name_ref GlobalReturnInt, imports.%GlobalReturnInt.cpp_overload_set.value [concrete = constants.%GlobalReturnInt.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %.loc36_5.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc36: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %X.ref.loc36: type = name_ref X, imports.%X.decl [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %.loc36_5.2: ref %X = temporary_storage
|
||||
// CHECK:STDOUT: %.loc36_5.3: init %X to %.loc36_5.2 = class_init () [concrete = constants.%X.val]
|
||||
// CHECK:STDOUT: %.loc36_7.1: init %X = converted %.loc36_5.1, %.loc36_5.3 [concrete = constants.%X.val]
|
||||
// CHECK:STDOUT: %.loc36_7.2: ref %X = temporary %.loc36_5.2, %.loc36_7.1 [concrete = constants.%.414]
|
||||
// CHECK:STDOUT: %B.ref: %X.B.cpp_overload_set.type = name_ref B, imports.%X.B.cpp_overload_set.value [concrete = constants.%X.B.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %bound_method.loc41: <bound method> = bound_method %.loc41_7.2, %B.ref [concrete = constants.%bound_method.f8c]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc41_7.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %.loc41_7.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc41_7.1 [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc41_7.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %.loc41_7.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc41_7.2 [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %bound_method.loc36: <bound method> = bound_method %.loc36_7.2, %B.ref [concrete = constants.%bound_method.f8c]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc36_7.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %.loc36_7.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc36_7.1 [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc36_7.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %.loc36_7.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc36_7.2 [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %SelfDestruct.call.loc41: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc41_7.2)
|
||||
// CHECK:STDOUT: %SelfDestruct.call.loc36: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc36_7.2)
|
||||
// CHECK:STDOUT: %Cpp.ref.loc42: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %X.ref.loc42: type = name_ref X, imports.%X.decl [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %C.ref: %X.C.cpp_overload_set.type = name_ref C, imports.%X.C.cpp_overload_set.value [concrete = constants.%X.C.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %.loc48_5.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc48: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %X.ref.loc48: type = name_ref X, imports.%X.decl [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %C.ref: %X.C.cpp_overload_set.type = name_ref C, imports.%X.C.cpp_overload_set.value [concrete = constants.%X.C.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %.loc55_5.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc55: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %X.ref.loc55: type = name_ref X, imports.%X.decl [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %.loc55_5.2: ref %X = temporary_storage
|
||||
// CHECK:STDOUT: %.loc55_5.3: init %X to %.loc55_5.2 = class_init () [concrete = constants.%X.val]
|
||||
// CHECK:STDOUT: %.loc55_7.1: init %X = converted %.loc55_5.1, %.loc55_5.3 [concrete = constants.%X.val]
|
||||
// CHECK:STDOUT: %.loc55_7.2: ref %X = temporary %.loc55_5.2, %.loc55_7.1 [concrete = constants.%.414]
|
||||
// CHECK:STDOUT: %.loc48_5.2: ref %X = temporary_storage
|
||||
// CHECK:STDOUT: %.loc48_5.3: init %X to %.loc48_5.2 = class_init () [concrete = constants.%X.val]
|
||||
// CHECK:STDOUT: %.loc48_7.1: init %X = converted %.loc48_5.1, %.loc48_5.3 [concrete = constants.%X.val]
|
||||
// CHECK:STDOUT: %.loc48_7.2: ref %X = temporary %.loc48_5.2, %.loc48_7.1 [concrete = constants.%.414]
|
||||
// CHECK:STDOUT: %D.ref: %X.D.cpp_overload_set.type = name_ref D, imports.%X.D.cpp_overload_set.value [concrete = constants.%X.D.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %bound_method.loc55: <bound method> = bound_method %.loc55_7.2, %D.ref [concrete = constants.%bound_method.9a8]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc55_7.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %.loc55_7.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc55_7.1 [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc55_7.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %.loc55_7.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc55_7.2 [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %bound_method.loc48: <bound method> = bound_method %.loc48_7.2, %D.ref [concrete = constants.%bound_method.9a8]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc48_7.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %.loc48_7.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc48_7.1 [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc48_7.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: %.loc48_7.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc48_7.2 [concrete = constants.%Destroy.facet]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %SelfDestruct.call.loc55: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc55_7.2)
|
||||
// CHECK:STDOUT: %SelfDestruct.call.loc48: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc48_7.2)
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -81,8 +81,7 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "special_name.h";
|
||||
|
||||
fn MyF() {
|
||||
// CHECK:STDERR: fail_import_special_name_call_escaped_no_match.carbon:[[@LINE+5]]:3-12: error: no matching function for call to 'base' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_import_special_name_call_escaped_no_match.carbon:[[@LINE-4]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_import_special_name_call_escaped_no_match.carbon:[[@LINE+4]]:3-12: error: no matching function for call to 'base' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./special_name.h:2:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./special_name.h:2:10-11: note: requires 0 arguments, but 1 was provided [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
|
||||
@@ -126,6 +126,8 @@ fn F() {
|
||||
|
||||
// --- forward_decl.h
|
||||
|
||||
// CHECK:STDERR: error: calling function with incomplete return type 'Incomplete' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./forward_decl.h:[[@LINE+1]]:7: note: forward declaration of 'Incomplete' [CppInteropParseNote]
|
||||
class Incomplete;
|
||||
|
||||
using CallbackType = Incomplete (*)();
|
||||
@@ -146,9 +148,6 @@ fn F() {
|
||||
// --- fail_use_forward_decl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
// CHECK:STDERR: error: calling function with incomplete return type 'Incomplete' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_use_forward_decl.carbon:[[@LINE+2]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: ./forward_decl.h:2:7: note: forward declaration of 'Incomplete' [CppInteropParseNote]
|
||||
import Cpp library "forward_decl.h";
|
||||
|
||||
fn F() {
|
||||
@@ -156,7 +155,7 @@ fn F() {
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_use_forward_decl.carbon:[[@LINE+5]]:3-24: error: function returns incomplete type `Cpp.Incomplete` [IncompleteTypeInFunctionReturnType]
|
||||
// CHECK:STDERR: included from: fail_use_forward_decl.carbon:[[@LINE-6]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: ./forward_decl.h:2:7: note: class was forward declared here [ClassForwardDeclaredHere]
|
||||
// CHECK:STDERR: ./forward_decl.h:4:7: note: class was forward declared here [ClassForwardDeclaredHere]
|
||||
// CHECK:STDERR: note: return type declared here [IncompleteReturnTypeHere]
|
||||
// CHECK:STDERR:
|
||||
Cpp.ReturnCallback()();
|
||||
|
||||
@@ -174,8 +174,7 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "negative_literal_passed_to_unsigned.h";
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_import_negative_literal_passed_to_unsigned.carbon:[[@LINE+4]]:27-28: error: negative integer value -1 converted to unsigned type `u32` [NegativeIntInUnsignedType]
|
||||
// CHECK:STDERR: included from: fail_import_negative_literal_passed_to_unsigned.carbon:[[@LINE-4]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_import_negative_literal_passed_to_unsigned.carbon:[[@LINE+3]]:27-28: error: negative integer value -1 converted to unsigned type `u32` [NegativeIntInUnsignedType]
|
||||
// CHECK:STDERR: ./negative_literal_passed_to_unsigned.h:2:39: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.neg_to_unsigned_foo(-1);
|
||||
@@ -203,8 +202,7 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "floating_point_literal.h";
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_import_large_floating_point_literal.carbon:[[@LINE+4]]:25-32: error: value 18*10^307 too large for floating-point type `f64` [FloatLiteralTooLargeForType]
|
||||
// CHECK:STDERR: included from: fail_import_large_floating_point_literal.carbon:[[@LINE-4]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_import_large_floating_point_literal.carbon:[[@LINE+3]]:25-32: error: value 18*10^307 too large for floating-point type `f64` [FloatLiteralTooLargeForType]
|
||||
// CHECK:STDERR: ./floating_point_literal.h:3:31: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.float_literal_foo(1.8e+308);
|
||||
@@ -249,37 +247,32 @@ import Cpp library "struct_init.h";
|
||||
fn MakeThreeFields() -> {.a: i32, .b: i32, .c: i32};
|
||||
|
||||
fn ThreeFields(value: {.a: i32, .b: i32, .c: i32}, ref reference: {.a: i32, .b: i32, .c: i32}) {
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+5]]:23-46: error: cannot implicitly convert expression of type `{.a: Core.IntLiteral, .b: Core.IntLiteral, .c: Core.IntLiteral}` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+4]]:23-46: note: type `{.a: Core.IntLiteral, .b: Core.IntLiteral, .c: Core.IntLiteral}` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_todo_struct_init_nonempty.carbon:[[@LINE-7]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+4]]:23-46: error: cannot implicitly convert expression of type `{.a: Core.IntLiteral, .b: Core.IntLiteral, .c: Core.IntLiteral}` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+3]]:23-46: note: type `{.a: Core.IntLiteral, .b: Core.IntLiteral, .c: Core.IntLiteral}` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassThreeFields({.a = 1, .b = 2, .c = 3});
|
||||
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+5]]:23-27: error: cannot implicitly convert expression of type `{.a: i32, .b: i32, .c: i32}` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+4]]:23-27: note: type `{.a: i32, .b: i32, .c: i32}` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_todo_struct_init_nonempty.carbon:[[@LINE-14]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+4]]:23-27: error: cannot implicitly convert expression of type `{.a: i32, .b: i32, .c: i32}` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+3]]:23-27: note: type `{.a: i32, .b: i32, .c: i32}` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassThreeFields(value);
|
||||
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+5]]:23-31: error: cannot implicitly convert expression of type `{.a: i32, .b: i32, .c: i32}` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+4]]:23-31: note: type `{.a: i32, .b: i32, .c: i32}` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_todo_struct_init_nonempty.carbon:[[@LINE-21]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+4]]:23-31: error: cannot implicitly convert expression of type `{.a: i32, .b: i32, .c: i32}` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+3]]:23-31: note: type `{.a: i32, .b: i32, .c: i32}` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassThreeFields(reference);
|
||||
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+5]]:23-39: error: cannot implicitly convert expression of type `{.a: i32, .b: i32, .c: i32}` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+4]]:23-39: note: type `{.a: i32, .b: i32, .c: i32}` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_todo_struct_init_nonempty.carbon:[[@LINE-28]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+4]]:23-39: error: cannot implicitly convert expression of type `{.a: i32, .b: i32, .c: i32}` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+3]]:23-39: note: type `{.a: i32, .b: i32, .c: i32}` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassThreeFields(MakeThreeFields());
|
||||
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+5]]:23-46: error: cannot implicitly convert expression of type `{.b: Core.IntLiteral, .c: Core.IntLiteral, .a: Core.IntLiteral}` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+4]]:23-46: note: type `{.b: Core.IntLiteral, .c: Core.IntLiteral, .a: Core.IntLiteral}` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_todo_struct_init_nonempty.carbon:[[@LINE-35]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+4]]:23-46: error: cannot implicitly convert expression of type `{.b: Core.IntLiteral, .c: Core.IntLiteral, .a: Core.IntLiteral}` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+3]]:23-46: note: type `{.b: Core.IntLiteral, .c: Core.IntLiteral, .a: Core.IntLiteral}` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassThreeFields({.b = 1, .c = 2, .a = 3});
|
||||
@@ -292,15 +285,13 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "struct_init.h";
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_struct_init_field_mismatch.carbon:[[@LINE+5]]:3-21: error: no matching function for call to 'PassThreeFields' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_struct_init_field_mismatch.carbon:[[@LINE-4]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_struct_init_field_mismatch.carbon:[[@LINE+4]]:3-21: error: no matching function for call to 'PassThreeFields' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./struct_init.h:10:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./struct_init.h:10:22-34: note: cannot convert initializer list argument to 'ThreeFields' [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassThreeFields({.a = 1, .b = 2, .c = 3, .d = 4});
|
||||
|
||||
// CHECK:STDERR: fail_struct_init_field_mismatch.carbon:[[@LINE+5]]:3-21: error: no matching function for call to 'PassThreeFields' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_struct_init_field_mismatch.carbon:[[@LINE-11]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_struct_init_field_mismatch.carbon:[[@LINE+4]]:3-21: error: no matching function for call to 'PassThreeFields' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./struct_init.h:10:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./struct_init.h:10:22-34: note: cannot convert initializer list argument to 'ThreeFields' [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
@@ -331,30 +322,26 @@ import Cpp library "struct_init.h";
|
||||
fn MakeEmpty() -> ();
|
||||
|
||||
fn Empty(value: (), ref reference: ()) {
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+5]]:20-21: error: cannot implicitly convert expression of type `()` to `Cpp.NoFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:20-21: note: type `()` does not implement interface `Core.ImplicitAs(Cpp.NoFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_struct_init_from_tuple.carbon:[[@LINE-10]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:20-21: error: cannot implicitly convert expression of type `()` to `Cpp.NoFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+3]]:20-21: note: type `()` does not implement interface `Core.ImplicitAs(Cpp.NoFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./struct_init.h:4:28: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassNoFields(());
|
||||
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+5]]:20-24: error: cannot implicitly convert expression of type `()` to `Cpp.NoFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:20-24: note: type `()` does not implement interface `Core.ImplicitAs(Cpp.NoFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_struct_init_from_tuple.carbon:[[@LINE-17]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:20-24: error: cannot implicitly convert expression of type `()` to `Cpp.NoFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+3]]:20-24: note: type `()` does not implement interface `Core.ImplicitAs(Cpp.NoFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./struct_init.h:4:28: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassNoFields(value);
|
||||
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+5]]:20-28: error: cannot implicitly convert expression of type `()` to `Cpp.NoFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:20-28: note: type `()` does not implement interface `Core.ImplicitAs(Cpp.NoFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_struct_init_from_tuple.carbon:[[@LINE-24]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:20-28: error: cannot implicitly convert expression of type `()` to `Cpp.NoFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+3]]:20-28: note: type `()` does not implement interface `Core.ImplicitAs(Cpp.NoFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./struct_init.h:4:28: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassNoFields(reference);
|
||||
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+5]]:20-30: error: cannot implicitly convert expression of type `()` to `Cpp.NoFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:20-30: note: type `()` does not implement interface `Core.ImplicitAs(Cpp.NoFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_struct_init_from_tuple.carbon:[[@LINE-31]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:20-30: error: cannot implicitly convert expression of type `()` to `Cpp.NoFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+3]]:20-30: note: type `()` does not implement interface `Core.ImplicitAs(Cpp.NoFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./struct_init.h:4:28: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassNoFields(MakeEmpty());
|
||||
@@ -363,30 +350,26 @@ fn Empty(value: (), ref reference: ()) {
|
||||
fn MakeThreeFields() -> (i32, i32, i32);
|
||||
|
||||
fn ThreeFields(value: (i32, i32, i32), ref reference: (i32, i32, i32)) {
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+5]]:23-31: error: cannot implicitly convert expression of type `(Core.IntLiteral, Core.IntLiteral, Core.IntLiteral)` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:23-31: note: type `(Core.IntLiteral, Core.IntLiteral, Core.IntLiteral)` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_struct_init_from_tuple.carbon:[[@LINE-42]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:23-31: error: cannot implicitly convert expression of type `(Core.IntLiteral, Core.IntLiteral, Core.IntLiteral)` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+3]]:23-31: note: type `(Core.IntLiteral, Core.IntLiteral, Core.IntLiteral)` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassThreeFields((1, 2, 3));
|
||||
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+5]]:23-27: error: cannot implicitly convert expression of type `(i32, i32, i32)` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:23-27: note: type `(i32, i32, i32)` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_struct_init_from_tuple.carbon:[[@LINE-49]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:23-27: error: cannot implicitly convert expression of type `(i32, i32, i32)` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+3]]:23-27: note: type `(i32, i32, i32)` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassThreeFields(value);
|
||||
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+5]]:23-31: error: cannot implicitly convert expression of type `(i32, i32, i32)` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:23-31: note: type `(i32, i32, i32)` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_struct_init_from_tuple.carbon:[[@LINE-56]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:23-31: error: cannot implicitly convert expression of type `(i32, i32, i32)` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+3]]:23-31: note: type `(i32, i32, i32)` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassThreeFields(reference);
|
||||
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+5]]:23-39: error: cannot implicitly convert expression of type `(i32, i32, i32)` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:23-39: note: type `(i32, i32, i32)` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_struct_init_from_tuple.carbon:[[@LINE-63]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+4]]:23-39: error: cannot implicitly convert expression of type `(i32, i32, i32)` to `Cpp.ThreeFields` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+3]]:23-39: note: type `(i32, i32, i32)` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassThreeFields(MakeThreeFields());
|
||||
@@ -410,16 +393,14 @@ import Cpp library "int_from_struct.h";
|
||||
fn F() {
|
||||
// C++ permits `{}` to be used to initialize an int, but Carbon does not.
|
||||
|
||||
// CHECK:STDERR: fail_int_from_struct.carbon:[[@LINE+5]]:15-16: error: cannot implicitly convert expression of type `{}` to `i32` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_int_from_struct.carbon:[[@LINE+4]]:15-16: note: type `{}` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_int_from_struct.carbon:[[@LINE-7]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_int_from_struct.carbon:[[@LINE+4]]:15-16: error: cannot implicitly convert expression of type `{}` to `i32` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_int_from_struct.carbon:[[@LINE+3]]:15-16: note: type `{}` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./int_from_struct.h:2:18: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassInt({});
|
||||
|
||||
// CHECK:STDERR: fail_int_from_struct.carbon:[[@LINE+5]]:15-16: error: cannot implicitly convert expression of type `()` to `i32` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_int_from_struct.carbon:[[@LINE+4]]:15-16: note: type `()` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_int_from_struct.carbon:[[@LINE-14]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_int_from_struct.carbon:[[@LINE+4]]:15-16: error: cannot implicitly convert expression of type `()` to `i32` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_int_from_struct.carbon:[[@LINE+3]]:15-16: note: type `()` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./int_from_struct.h:2:18: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassInt(());
|
||||
@@ -435,16 +416,14 @@ fn F() {
|
||||
// C++ overload resolution prefers to convert `{}` to `int` rather than to an
|
||||
// empty struct. So that's the overload we pick, even though we can't call it.
|
||||
|
||||
// CHECK:STDERR: fail_int_from_struct_overloaded.carbon:[[@LINE+5]]:22-23: error: cannot implicitly convert expression of type `{}` to `i32` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_int_from_struct_overloaded.carbon:[[@LINE+4]]:22-23: note: type `{}` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_int_from_struct_overloaded.carbon:[[@LINE-8]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_int_from_struct_overloaded.carbon:[[@LINE+4]]:22-23: error: cannot implicitly convert expression of type `{}` to `i32` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_int_from_struct_overloaded.carbon:[[@LINE+3]]:22-23: note: type `{}` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./int_from_struct.h:6:25: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassOverloaded({});
|
||||
|
||||
// CHECK:STDERR: fail_int_from_struct_overloaded.carbon:[[@LINE+5]]:22-23: error: cannot implicitly convert expression of type `()` to `i32` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_int_from_struct_overloaded.carbon:[[@LINE+4]]:22-23: note: type `()` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_int_from_struct_overloaded.carbon:[[@LINE-15]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_int_from_struct_overloaded.carbon:[[@LINE+4]]:22-23: error: cannot implicitly convert expression of type `()` to `i32` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_int_from_struct_overloaded.carbon:[[@LINE+3]]:22-23: note: type `()` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./int_from_struct.h:6:25: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.PassOverloaded(());
|
||||
@@ -470,8 +449,7 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "nested_structs.h";
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_pass_nested_structs_inner_field_mismatch.carbon:[[@LINE+5]]:3-11: error: no matching function for call to 'TakeB' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_pass_nested_structs_inner_field_mismatch.carbon:[[@LINE-4]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_pass_nested_structs_inner_field_mismatch.carbon:[[@LINE+4]]:3-11: error: no matching function for call to 'TakeB' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./nested_structs.h:11:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./nested_structs.h:11:12: note: cannot convert initializer list argument to 'B' [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
@@ -485,9 +463,8 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "nested_structs.h";
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_todo_pass_nested_structs.carbon:[[@LINE+5]]:13-43: error: cannot implicitly convert expression of type `{.a: {.x: Core.IntLiteral, .y: Core.IntLiteral}, .n: Core.IntLiteral}` to `Cpp.B` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_pass_nested_structs.carbon:[[@LINE+4]]:13-43: note: type `{.a: {.x: Core.IntLiteral, .y: Core.IntLiteral}, .n: Core.IntLiteral}` does not implement interface `Core.ImplicitAs(Cpp.B)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_todo_pass_nested_structs.carbon:[[@LINE-5]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_todo_pass_nested_structs.carbon:[[@LINE+4]]:13-43: error: cannot implicitly convert expression of type `{.a: {.x: Core.IntLiteral, .y: Core.IntLiteral}, .n: Core.IntLiteral}` to `Cpp.B` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_todo_pass_nested_structs.carbon:[[@LINE+3]]:13-43: note: type `{.a: {.x: Core.IntLiteral, .y: Core.IntLiteral}, .n: Core.IntLiteral}` does not implement interface `Core.ImplicitAs(Cpp.B)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./nested_structs.h:11:13: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.TakeB({.a = {.x = 1, .y = 2}, .n = 3});
|
||||
@@ -522,9 +499,8 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "signedness_change.h";
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_signedness_change_rejected.carbon:[[@LINE+5]]:22-29: error: cannot implicitly convert expression of type `i32` to `u32` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_signedness_change_rejected.carbon:[[@LINE+4]]:22-29: note: type `i32` does not implement interface `Core.ImplicitAs(u32)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_signedness_change_rejected.carbon:[[@LINE-5]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_signedness_change_rejected.carbon:[[@LINE+4]]:22-29: error: cannot implicitly convert expression of type `i32` to `u32` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_signedness_change_rejected.carbon:[[@LINE+3]]:22-29: note: type `i32` does not implement interface `Core.ImplicitAs(u32)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./signedness_change.h:2:34: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.signedness_foo(1 as i32);
|
||||
@@ -541,9 +517,8 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "downsizing_rejected.h";
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_import_downsizing_rejected.carbon:[[@LINE+5]]:22-29: error: cannot implicitly convert expression of type `i32` to `i16` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_import_downsizing_rejected.carbon:[[@LINE+4]]:22-29: note: type `i32` does not implement interface `Core.ImplicitAs(i16)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: included from: fail_import_downsizing_rejected.carbon:[[@LINE-5]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_import_downsizing_rejected.carbon:[[@LINE+4]]:22-29: error: cannot implicitly convert expression of type `i32` to `i16` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_import_downsizing_rejected.carbon:[[@LINE+3]]:22-29: note: type `i32` does not implement interface `Core.ImplicitAs(i16)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: ./downsizing_rejected.h:2:27: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR:
|
||||
Cpp.downsizing_foo(1 as i32);
|
||||
@@ -564,8 +539,7 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "no_viable_function.h";
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_import_no_viable_function.carbon:[[@LINE+5]]:3-19: error: no matching function for call to 'no_viable_foo' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_import_no_viable_function.carbon:[[@LINE-4]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_import_no_viable_function.carbon:[[@LINE+4]]:3-19: error: no matching function for call to 'no_viable_foo' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./no_viable_function.h:2:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./no_viable_function.h:2:20-33: note: requires 2 arguments, but 1 was provided [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
@@ -588,8 +562,7 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "ambiguous_overload.h";
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_import_ambiguous_overload.carbon:[[@LINE+5]]:3-19: error: call to 'ambiguous_foo' is ambiguous [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_import_ambiguous_overload.carbon:[[@LINE-4]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_import_ambiguous_overload.carbon:[[@LINE+4]]:3-19: error: call to 'ambiguous_foo' is ambiguous [CppInteropParseError]
|
||||
// CHECK:STDERR: ./ambiguous_overload.h:2:6: note: candidate function [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./ambiguous_overload.h:3:6: note: candidate function [CppInteropParseNote]
|
||||
// CHECK:STDERR:
|
||||
@@ -612,8 +585,7 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp library "deleted_function.h";
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_import_deleted_function.carbon:[[@LINE+5]]:3-17: error: call to deleted function 'deleted_foo' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_import_deleted_function.carbon:[[@LINE-4]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_import_deleted_function.carbon:[[@LINE+4]]:3-17: error: call to deleted function 'deleted_foo' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./deleted_function.h:3:6: note: candidate function has been explicitly deleted [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./deleted_function.h:2:6: note: candidate function [CppInteropParseNote]
|
||||
// CHECK:STDERR:
|
||||
|
||||
@@ -43,8 +43,7 @@ fn G() -> const Cpp.NonNullableParamS;
|
||||
|
||||
fn F() {
|
||||
var s: const Cpp.NonNullableParamS = G();
|
||||
// CHECK:STDERR: fail_import_non_nullable_pointer_param_using_const_value.carbon:[[@LINE+5]]:3-28: error: no matching function for call to 'non_nullable_param_foo' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_import_non_nullable_pointer_param_using_const_value.carbon:[[@LINE-7]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_import_non_nullable_pointer_param_using_const_value.carbon:[[@LINE+4]]:3-28: error: no matching function for call to 'non_nullable_param_foo' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./non_nullable_pointer_param.h:4:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./non_nullable_pointer_param.h:4:29-55: note: 1st argument ('const NonNullableParamS * _Nonnull') would lose const qualifier [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
|
||||
+109
-120
@@ -44,31 +44,27 @@ fn F() {
|
||||
//@dump-sem-ir-begin
|
||||
var v: Cpp.S;
|
||||
let s: Cpp.S = v;
|
||||
// CHECK:STDERR: fail_param_lvalue_ref.carbon:[[@LINE+5]]:3-17: error: no matching function for call to 'TakesLValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_param_lvalue_ref.carbon:[[@LINE-7]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_param_lvalue_ref.carbon:[[@LINE+4]]:3-17: error: no matching function for call to 'TakesLValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./param_lvalue_ref.h:5:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./param_lvalue_ref.h:5:18-19: note: 1st argument ('const S') would lose const qualifier [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
Cpp.TakesLValue(s);
|
||||
|
||||
// CHECK:STDERR: fail_param_lvalue_ref.carbon:[[@LINE+5]]:3-17: error: no matching function for call to 'TakesLValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_param_lvalue_ref.carbon:[[@LINE-14]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_param_lvalue_ref.carbon:[[@LINE+4]]:3-17: error: no matching function for call to 'TakesLValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./param_lvalue_ref.h:5:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./param_lvalue_ref.h:5:18-19: note: 1st argument ('const S') would lose const qualifier [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
Cpp.TakesLValue(s as const Cpp.S);
|
||||
|
||||
var t: Cpp.T;
|
||||
// CHECK:STDERR: fail_param_lvalue_ref.carbon:[[@LINE+5]]:3-17: error: no matching function for call to 'TakesLValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_param_lvalue_ref.carbon:[[@LINE-22]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_param_lvalue_ref.carbon:[[@LINE+4]]:3-17: error: no matching function for call to 'TakesLValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./param_lvalue_ref.h:5:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./param_lvalue_ref.h:5:18-19: note: no known conversion from 'T' to 'S &' for 1st argument [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
Cpp.TakesLValue(t);
|
||||
|
||||
var u: Cpp.S;
|
||||
// CHECK:STDERR: fail_param_lvalue_ref.carbon:[[@LINE+5]]:3-17: error: no matching function for call to 'TakesLValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_param_lvalue_ref.carbon:[[@LINE-30]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_param_lvalue_ref.carbon:[[@LINE+4]]:3-17: error: no matching function for call to 'TakesLValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./param_lvalue_ref.h:5:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./param_lvalue_ref.h:5:18-19: note: 1st argument ('const S') would lose const qualifier [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
@@ -123,8 +119,7 @@ import Cpp library "param_rvalue_ref.h";
|
||||
|
||||
fn F() {
|
||||
let s: Cpp.S = {};
|
||||
// CHECK:STDERR: fail_param_value_arg_for_rvalue_ref.carbon:[[@LINE+5]]:3-17: error: no matching function for call to 'TakesRValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_param_value_arg_for_rvalue_ref.carbon:[[@LINE-5]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_param_value_arg_for_rvalue_ref.carbon:[[@LINE+4]]:3-17: error: no matching function for call to 'TakesRValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./param_rvalue_ref.h:5:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./param_rvalue_ref.h:5:18-20: note: 1st argument ('const S') would lose const qualifier [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
@@ -140,23 +135,20 @@ import Cpp library "param_rvalue_ref.h";
|
||||
fn F() {
|
||||
//@dump-sem-ir-begin
|
||||
var s: Cpp.S;
|
||||
// CHECK:STDERR: fail_param_rvalue_ref.carbon:[[@LINE+5]]:3-17: error: no matching function for call to 'TakesRValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_param_rvalue_ref.carbon:[[@LINE-6]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_param_rvalue_ref.carbon:[[@LINE+4]]:3-17: error: no matching function for call to 'TakesRValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./param_rvalue_ref.h:5:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./param_rvalue_ref.h:5:18-20: note: expects an rvalue for 1st argument [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
Cpp.TakesRValue(s);
|
||||
|
||||
var t: Cpp.T;
|
||||
// CHECK:STDERR: fail_param_rvalue_ref.carbon:[[@LINE+5]]:3-17: error: no matching function for call to 'TakesRValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_param_rvalue_ref.carbon:[[@LINE-14]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_param_rvalue_ref.carbon:[[@LINE+4]]:3-17: error: no matching function for call to 'TakesRValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./param_rvalue_ref.h:5:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./param_rvalue_ref.h:5:18-20: note: no known conversion from 'T' to 'S' for 1st argument [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
Cpp.TakesRValue(t);
|
||||
|
||||
// CHECK:STDERR: fail_param_rvalue_ref.carbon:[[@LINE+5]]:3-17: error: no matching function for call to 'TakesRValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_param_rvalue_ref.carbon:[[@LINE-21]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_param_rvalue_ref.carbon:[[@LINE+4]]:3-17: error: no matching function for call to 'TakesRValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./param_rvalue_ref.h:5:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./param_rvalue_ref.h:5:18-20: note: 1st argument ('const S') would lose const qualifier [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
@@ -213,8 +205,7 @@ import Cpp library "param_const_lvalue_ref.h";
|
||||
|
||||
fn F() {
|
||||
var t: Cpp.T;
|
||||
// CHECK:STDERR: fail_call_param_const_lvalue_ref_with_wrong_type.carbon:[[@LINE+5]]:3-22: error: no matching function for call to 'TakesConstLValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_call_param_const_lvalue_ref_with_wrong_type.carbon:[[@LINE-5]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_call_param_const_lvalue_ref_with_wrong_type.carbon:[[@LINE+4]]:3-22: error: no matching function for call to 'TakesConstLValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./param_const_lvalue_ref.h:5:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./param_const_lvalue_ref.h:5:23-30: note: no known conversion from 'T' to 'const S' for 1st argument [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
@@ -269,16 +260,14 @@ import Cpp library "param_const_rvalue_ref.h";
|
||||
fn F() {
|
||||
//@dump-sem-ir-begin
|
||||
var s: Cpp.S;
|
||||
// CHECK:STDERR: fail_param_lvalue_ref_arg_const_rvalue_ref.carbon:[[@LINE+5]]:3-22: error: no matching function for call to 'TakesConstRValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_param_lvalue_ref_arg_const_rvalue_ref.carbon:[[@LINE-6]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_param_lvalue_ref_arg_const_rvalue_ref.carbon:[[@LINE+4]]:3-22: error: no matching function for call to 'TakesConstRValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./param_const_rvalue_ref.h:5:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./param_const_rvalue_ref.h:5:23-31: note: expects an rvalue for 1st argument [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
Cpp.TakesConstRValue(s);
|
||||
|
||||
var t: Cpp.T;
|
||||
// CHECK:STDERR: fail_param_lvalue_ref_arg_const_rvalue_ref.carbon:[[@LINE+5]]:3-22: error: no matching function for call to 'TakesConstRValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: included from: fail_param_lvalue_ref_arg_const_rvalue_ref.carbon:[[@LINE-14]]:10 [InCppInclude]
|
||||
// CHECK:STDERR: fail_param_lvalue_ref_arg_const_rvalue_ref.carbon:[[@LINE+4]]:3-22: error: no matching function for call to 'TakesConstRValue' [CppInteropParseError]
|
||||
// CHECK:STDERR: ./param_const_rvalue_ref.h:5:6: note: candidate function not viable [CppInteropParseNote]
|
||||
// CHECK:STDERR: ./param_const_rvalue_ref.h:5:23-31: note: no known conversion from 'T' to 'const S' for 1st argument [CppInteropParseNoteReason]
|
||||
// CHECK:STDERR:
|
||||
@@ -618,28 +607,28 @@ fn PassConstRef(ref x: const XByRef) {
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %s.patt: %pattern_type.0f5 = value_binding_pattern s [concrete = constants.%s.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesLValue.ref.loc15: %TakesLValue.cpp_overload_set.type = name_ref TakesLValue, imports.%TakesLValue.cpp_overload_set.value [concrete = constants.%TakesLValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %s.ref.loc15: %S = name_ref s, %s
|
||||
// CHECK:STDOUT: %Cpp.ref.loc22_3: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesLValue.ref.loc22: %TakesLValue.cpp_overload_set.type = name_ref TakesLValue, imports.%TakesLValue.cpp_overload_set.value [concrete = constants.%TakesLValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %s.ref.loc22: %S = name_ref s, %s
|
||||
// CHECK:STDOUT: %Cpp.ref.loc22_30: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %S.ref.loc22: type = name_ref S, imports.%S.decl [concrete = constants.%S]
|
||||
// CHECK:STDOUT: %const.loc22: type = const_type %S.ref.loc22 [concrete = constants.%const]
|
||||
// CHECK:STDOUT: %.loc22_21.1: %const = as_compatible %s.ref.loc22
|
||||
// CHECK:STDOUT: %.loc22_21.2: %const = converted %s.ref.loc22, %.loc22_21.1
|
||||
// CHECK:STDOUT: %Cpp.ref.loc14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesLValue.ref.loc14: %TakesLValue.cpp_overload_set.type = name_ref TakesLValue, imports.%TakesLValue.cpp_overload_set.value [concrete = constants.%TakesLValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %s.ref.loc14: %S = name_ref s, %s
|
||||
// CHECK:STDOUT: %Cpp.ref.loc20_3: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesLValue.ref.loc20: %TakesLValue.cpp_overload_set.type = name_ref TakesLValue, imports.%TakesLValue.cpp_overload_set.value [concrete = constants.%TakesLValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %s.ref.loc20: %S = name_ref s, %s
|
||||
// CHECK:STDOUT: %Cpp.ref.loc20_30: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %S.ref.loc20: type = name_ref S, imports.%S.decl [concrete = constants.%S]
|
||||
// CHECK:STDOUT: %const.loc20: type = const_type %S.ref.loc20 [concrete = constants.%const]
|
||||
// CHECK:STDOUT: %.loc20_21.1: %const = as_compatible %s.ref.loc20
|
||||
// CHECK:STDOUT: %.loc20_21.2: %const = converted %s.ref.loc20, %.loc20_21.1
|
||||
// CHECK:STDOUT: %t.var: ref %T.ed0 = var_storage %t.var_patt
|
||||
// CHECK:STDOUT: %DefaultOrUnformed.facet.loc24: %DefaultOrUnformed.type = facet_value constants.%T.ed0, (constants.%DefaultOrUnformed.impl_witness.307) [concrete = constants.%DefaultOrUnformed.facet.d8b]
|
||||
// CHECK:STDOUT: %.loc24_15.1: %DefaultOrUnformed.type = converted constants.%T.ed0, %DefaultOrUnformed.facet.loc24 [concrete = constants.%DefaultOrUnformed.facet.d8b]
|
||||
// CHECK:STDOUT: %as_type.loc24: type = facet_access_type %.loc24_15.1 [concrete = constants.%T.ed0]
|
||||
// CHECK:STDOUT: %.loc24_15.2: type = converted %.loc24_15.1, %as_type.loc24 [concrete = constants.%T.ed0]
|
||||
// CHECK:STDOUT: %DefaultOrUnformed.facet.loc22: %DefaultOrUnformed.type = facet_value constants.%T.ed0, (constants.%DefaultOrUnformed.impl_witness.307) [concrete = constants.%DefaultOrUnformed.facet.d8b]
|
||||
// CHECK:STDOUT: %.loc22_15.1: %DefaultOrUnformed.type = converted constants.%T.ed0, %DefaultOrUnformed.facet.loc22 [concrete = constants.%DefaultOrUnformed.facet.d8b]
|
||||
// CHECK:STDOUT: %as_type.loc22: type = facet_access_type %.loc22_15.1 [concrete = constants.%T.ed0]
|
||||
// CHECK:STDOUT: %.loc22_15.2: type = converted %.loc22_15.1, %as_type.loc22 [concrete = constants.%T.ed0]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %.loc24_3.1: ref %T.ed0 = splice_block %t.var {}
|
||||
// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc24: init %T.ed0 to %.loc24_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.2()
|
||||
// CHECK:STDOUT: assign %t.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc24
|
||||
// CHECK:STDOUT: %.loc24_13: type = splice_block %T.ref [concrete = constants.%T.ed0] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %.loc22_3.1: ref %T.ed0 = splice_block %t.var {}
|
||||
// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc22: init %T.ed0 to %.loc22_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.2()
|
||||
// CHECK:STDOUT: assign %t.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc22
|
||||
// CHECK:STDOUT: %.loc22_13: type = splice_block %T.ref [concrete = constants.%T.ed0] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc22: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, imports.%T.decl [concrete = constants.%T.ed0]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %t: ref %T.ed0 = wrapper_binding t, %t.var
|
||||
@@ -647,47 +636,47 @@ fn PassConstRef(ref x: const XByRef) {
|
||||
// CHECK:STDOUT: %t.patt: %pattern_type.5f6 = ref_binding_pattern t [concrete = constants.%t.patt.420]
|
||||
// CHECK:STDOUT: %t.var_patt: %pattern_type.5f6 = var_pattern %t.patt [concrete = constants.%t.var_patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Cpp.ref.loc30: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesLValue.ref.loc30: %TakesLValue.cpp_overload_set.type = name_ref TakesLValue, imports.%TakesLValue.cpp_overload_set.value [concrete = constants.%TakesLValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc27: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesLValue.ref.loc27: %TakesLValue.cpp_overload_set.type = name_ref TakesLValue, imports.%TakesLValue.cpp_overload_set.value [concrete = constants.%TakesLValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %t.ref: ref %T.ed0 = name_ref t, %t
|
||||
// CHECK:STDOUT: %u.var: ref %S = var_storage %u.var_patt
|
||||
// CHECK:STDOUT: %DefaultOrUnformed.facet.loc32: %DefaultOrUnformed.type = facet_value constants.%S, (constants.%DefaultOrUnformed.impl_witness.e4a) [concrete = constants.%DefaultOrUnformed.facet.cbb]
|
||||
// CHECK:STDOUT: %.loc32_15.1: %DefaultOrUnformed.type = converted constants.%S, %DefaultOrUnformed.facet.loc32 [concrete = constants.%DefaultOrUnformed.facet.cbb]
|
||||
// CHECK:STDOUT: %as_type.loc32: type = facet_access_type %.loc32_15.1 [concrete = constants.%S]
|
||||
// CHECK:STDOUT: %.loc32_15.2: type = converted %.loc32_15.1, %as_type.loc32 [concrete = constants.%S]
|
||||
// CHECK:STDOUT: %DefaultOrUnformed.facet.loc29: %DefaultOrUnformed.type = facet_value constants.%S, (constants.%DefaultOrUnformed.impl_witness.e4a) [concrete = constants.%DefaultOrUnformed.facet.cbb]
|
||||
// CHECK:STDOUT: %.loc29_15.1: %DefaultOrUnformed.type = converted constants.%S, %DefaultOrUnformed.facet.loc29 [concrete = constants.%DefaultOrUnformed.facet.cbb]
|
||||
// CHECK:STDOUT: %as_type.loc29: type = facet_access_type %.loc29_15.1 [concrete = constants.%S]
|
||||
// CHECK:STDOUT: %.loc29_15.2: type = converted %.loc29_15.1, %as_type.loc29 [concrete = constants.%S]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %.loc32_3.1: ref %S = splice_block %u.var {}
|
||||
// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc32: init %S to %.loc32_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.3()
|
||||
// CHECK:STDOUT: assign %u.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc32
|
||||
// CHECK:STDOUT: %.loc32_13: type = splice_block %S.ref.loc32 [concrete = constants.%S] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc32: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %S.ref.loc32: type = name_ref S, imports.%S.decl [concrete = constants.%S]
|
||||
// CHECK:STDOUT: %.loc29_3.1: ref %S = splice_block %u.var {}
|
||||
// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc29: init %S to %.loc29_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.3()
|
||||
// CHECK:STDOUT: assign %u.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc29
|
||||
// CHECK:STDOUT: %.loc29_13: type = splice_block %S.ref.loc29 [concrete = constants.%S] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc29: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %S.ref.loc29: type = name_ref S, imports.%S.decl [concrete = constants.%S]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %u: ref %S = wrapper_binding u, %u.var
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %u.patt: %pattern_type.0f5 = ref_binding_pattern u [concrete = constants.%u.patt]
|
||||
// CHECK:STDOUT: %u.var_patt: %pattern_type.0f5 = var_pattern %u.patt [concrete = constants.%u.var_patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Cpp.ref.loc38_3: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesLValue.ref.loc38: %TakesLValue.cpp_overload_set.type = name_ref TakesLValue, imports.%TakesLValue.cpp_overload_set.value [concrete = constants.%TakesLValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc34_3: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesLValue.ref.loc34: %TakesLValue.cpp_overload_set.type = name_ref TakesLValue, imports.%TakesLValue.cpp_overload_set.value [concrete = constants.%TakesLValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %u.ref: ref %S = name_ref u, %u
|
||||
// CHECK:STDOUT: %Cpp.ref.loc38_30: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %S.ref.loc38: type = name_ref S, imports.%S.decl [concrete = constants.%S]
|
||||
// CHECK:STDOUT: %const.loc38: type = const_type %S.ref.loc38 [concrete = constants.%const]
|
||||
// CHECK:STDOUT: %.loc38_21.1: ref %const = as_compatible %u.ref
|
||||
// CHECK:STDOUT: %.loc38_21.2: ref %const = converted %u.ref, %.loc38_21.1
|
||||
// CHECK:STDOUT: %Destroy.facet.loc32_3.1: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.580]
|
||||
// CHECK:STDOUT: %.loc32_3.2: %Destroy.type = converted constants.%S, %Destroy.facet.loc32_3.1 [concrete = constants.%Destroy.facet.580]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc32_3.2: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.580]
|
||||
// CHECK:STDOUT: %.loc32_3.3: %Destroy.type = converted constants.%S, %Destroy.facet.loc32_3.2 [concrete = constants.%Destroy.facet.580]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc34_30: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %S.ref.loc34: type = name_ref S, imports.%S.decl [concrete = constants.%S]
|
||||
// CHECK:STDOUT: %const.loc34: type = const_type %S.ref.loc34 [concrete = constants.%const]
|
||||
// CHECK:STDOUT: %.loc34_21.1: ref %const = as_compatible %u.ref
|
||||
// CHECK:STDOUT: %.loc34_21.2: ref %const = converted %u.ref, %.loc34_21.1
|
||||
// CHECK:STDOUT: %Destroy.facet.loc29_3.1: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.580]
|
||||
// CHECK:STDOUT: %.loc29_3.2: %Destroy.type = converted constants.%S, %Destroy.facet.loc29_3.1 [concrete = constants.%Destroy.facet.580]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc29_3.2: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.580]
|
||||
// CHECK:STDOUT: %.loc29_3.3: %Destroy.type = converted constants.%S, %Destroy.facet.loc29_3.2 [concrete = constants.%Destroy.facet.580]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %SelfDestruct.call.loc32: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%u.var)
|
||||
// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %SelfDestruct.call.loc29: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%u.var)
|
||||
// CHECK:STDOUT: %Destroy.facet.loc22_3.1: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %.loc22_3.2: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc22_3.1 [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc22_3.2: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %.loc22_3.3: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc22_3.2 [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %SelfDestruct.call.loc24: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%t.var)
|
||||
// CHECK:STDOUT: %SelfDestruct.call.loc22: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%t.var)
|
||||
// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.580]
|
||||
// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%S, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.580]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.580]
|
||||
@@ -836,20 +825,20 @@ fn PassConstRef(ref x: const XByRef) {
|
||||
// CHECK:STDOUT: %s.patt: %pattern_type.0f5 = ref_binding_pattern s [concrete = constants.%s.patt]
|
||||
// CHECK:STDOUT: %s.var_patt: %pattern_type.0f5 = var_pattern %s.patt [concrete = constants.%s.var_patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Cpp.ref.loc14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesRValue.ref.loc14: %TakesRValue.cpp_overload_set.type = name_ref TakesRValue, imports.%TakesRValue.cpp_overload_set.value [concrete = constants.%TakesRValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc13: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesRValue.ref.loc13: %TakesRValue.cpp_overload_set.type = name_ref TakesRValue, imports.%TakesRValue.cpp_overload_set.value [concrete = constants.%TakesRValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %s.ref: ref %S = name_ref s, %s
|
||||
// CHECK:STDOUT: %t.var: ref %T.ed0 = var_storage %t.var_patt
|
||||
// CHECK:STDOUT: %DefaultOrUnformed.facet.loc16: %DefaultOrUnformed.type = facet_value constants.%T.ed0, (constants.%DefaultOrUnformed.impl_witness.307) [concrete = constants.%DefaultOrUnformed.facet.d8b]
|
||||
// CHECK:STDOUT: %.loc16_15.1: %DefaultOrUnformed.type = converted constants.%T.ed0, %DefaultOrUnformed.facet.loc16 [concrete = constants.%DefaultOrUnformed.facet.d8b]
|
||||
// CHECK:STDOUT: %as_type.loc16: type = facet_access_type %.loc16_15.1 [concrete = constants.%T.ed0]
|
||||
// CHECK:STDOUT: %.loc16_15.2: type = converted %.loc16_15.1, %as_type.loc16 [concrete = constants.%T.ed0]
|
||||
// CHECK:STDOUT: %DefaultOrUnformed.facet.loc15: %DefaultOrUnformed.type = facet_value constants.%T.ed0, (constants.%DefaultOrUnformed.impl_witness.307) [concrete = constants.%DefaultOrUnformed.facet.d8b]
|
||||
// CHECK:STDOUT: %.loc15_15.1: %DefaultOrUnformed.type = converted constants.%T.ed0, %DefaultOrUnformed.facet.loc15 [concrete = constants.%DefaultOrUnformed.facet.d8b]
|
||||
// CHECK:STDOUT: %as_type.loc15: type = facet_access_type %.loc15_15.1 [concrete = constants.%T.ed0]
|
||||
// CHECK:STDOUT: %.loc15_15.2: type = converted %.loc15_15.1, %as_type.loc15 [concrete = constants.%T.ed0]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %.loc16_3.1: ref %T.ed0 = splice_block %t.var {}
|
||||
// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc16: init %T.ed0 to %.loc16_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.2()
|
||||
// CHECK:STDOUT: assign %t.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc16
|
||||
// CHECK:STDOUT: %.loc16_13: type = splice_block %T.ref [concrete = constants.%T.ed0] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc16: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %.loc15_3.1: ref %T.ed0 = splice_block %t.var {}
|
||||
// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc15: init %T.ed0 to %.loc15_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.2()
|
||||
// CHECK:STDOUT: assign %t.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc15
|
||||
// CHECK:STDOUT: %.loc15_13: type = splice_block %T.ref [concrete = constants.%T.ed0] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, imports.%T.decl [concrete = constants.%T.ed0]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %t: ref %T.ed0 = wrapper_binding t, %t.var
|
||||
@@ -857,28 +846,28 @@ fn PassConstRef(ref x: const XByRef) {
|
||||
// CHECK:STDOUT: %t.patt: %pattern_type.5f6 = ref_binding_pattern t [concrete = constants.%t.patt.420]
|
||||
// CHECK:STDOUT: %t.var_patt: %pattern_type.5f6 = var_pattern %t.patt [concrete = constants.%t.var_patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Cpp.ref.loc22: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesRValue.ref.loc22: %TakesRValue.cpp_overload_set.type = name_ref TakesRValue, imports.%TakesRValue.cpp_overload_set.value [concrete = constants.%TakesRValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc20: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesRValue.ref.loc20: %TakesRValue.cpp_overload_set.type = name_ref TakesRValue, imports.%TakesRValue.cpp_overload_set.value [concrete = constants.%TakesRValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %t.ref: ref %T.ed0 = name_ref t, %t
|
||||
// CHECK:STDOUT: %Cpp.ref.loc29_3: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesRValue.ref.loc29: %TakesRValue.cpp_overload_set.type = name_ref TakesRValue, imports.%TakesRValue.cpp_overload_set.value [concrete = constants.%TakesRValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %.loc29_21.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct.a40]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc29_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %S.ref.loc29_29: type = name_ref S, imports.%S.decl [concrete = constants.%S]
|
||||
// CHECK:STDOUT: %.loc29_21.2: ref %S = temporary_storage
|
||||
// CHECK:STDOUT: %.loc29_21.3: init %S to %.loc29_21.2 = class_init () [concrete = constants.%S.val]
|
||||
// CHECK:STDOUT: %.loc29_23: init %S = converted %.loc29_21.1, %.loc29_21.3 [concrete = constants.%S.val]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc29_42: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %S.ref.loc29_45: type = name_ref S, imports.%S.decl [concrete = constants.%S]
|
||||
// CHECK:STDOUT: %const: type = const_type %S.ref.loc29_45 [concrete = constants.%const]
|
||||
// CHECK:STDOUT: %.loc29_33.1: init %const = as_compatible %.loc29_23 [concrete = constants.%empty_struct.674]
|
||||
// CHECK:STDOUT: %.loc29_33.2: init %const = converted %.loc29_23, %.loc29_33.1 [concrete = constants.%empty_struct.674]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %.loc16_3.3: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc26_3: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesRValue.ref.loc26: %TakesRValue.cpp_overload_set.type = name_ref TakesRValue, imports.%TakesRValue.cpp_overload_set.value [concrete = constants.%TakesRValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %.loc26_21.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct.a40]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc26_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %S.ref.loc26_29: type = name_ref S, imports.%S.decl [concrete = constants.%S]
|
||||
// CHECK:STDOUT: %.loc26_21.2: ref %S = temporary_storage
|
||||
// CHECK:STDOUT: %.loc26_21.3: init %S to %.loc26_21.2 = class_init () [concrete = constants.%S.val]
|
||||
// CHECK:STDOUT: %.loc26_23: init %S = converted %.loc26_21.1, %.loc26_21.3 [concrete = constants.%S.val]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc26_42: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %S.ref.loc26_45: type = name_ref S, imports.%S.decl [concrete = constants.%S]
|
||||
// CHECK:STDOUT: %const: type = const_type %S.ref.loc26_45 [concrete = constants.%const]
|
||||
// CHECK:STDOUT: %.loc26_33.1: init %const = as_compatible %.loc26_23 [concrete = constants.%empty_struct.674]
|
||||
// CHECK:STDOUT: %.loc26_33.2: init %const = converted %.loc26_23, %.loc26_33.1 [concrete = constants.%empty_struct.674]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%t.var)
|
||||
// CHECK:STDOUT: %SelfDestruct.call.loc15: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%t.var)
|
||||
// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.580]
|
||||
// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%S, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.580]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.580]
|
||||
@@ -1224,20 +1213,20 @@ fn PassConstRef(ref x: const XByRef) {
|
||||
// CHECK:STDOUT: %s.patt: %pattern_type.0f5 = ref_binding_pattern s [concrete = constants.%s.patt]
|
||||
// CHECK:STDOUT: %s.var_patt: %pattern_type.0f5 = var_pattern %s.patt [concrete = constants.%s.var_patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Cpp.ref.loc14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesConstRValue.ref.loc14: %TakesConstRValue.cpp_overload_set.type = name_ref TakesConstRValue, imports.%TakesConstRValue.cpp_overload_set.value [concrete = constants.%TakesConstRValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc13: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesConstRValue.ref.loc13: %TakesConstRValue.cpp_overload_set.type = name_ref TakesConstRValue, imports.%TakesConstRValue.cpp_overload_set.value [concrete = constants.%TakesConstRValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %s.ref: ref %S = name_ref s, %s
|
||||
// CHECK:STDOUT: %t.var: ref %T.ed0 = var_storage %t.var_patt
|
||||
// CHECK:STDOUT: %DefaultOrUnformed.facet.loc16: %DefaultOrUnformed.type = facet_value constants.%T.ed0, (constants.%DefaultOrUnformed.impl_witness.307) [concrete = constants.%DefaultOrUnformed.facet.d8b]
|
||||
// CHECK:STDOUT: %.loc16_15.1: %DefaultOrUnformed.type = converted constants.%T.ed0, %DefaultOrUnformed.facet.loc16 [concrete = constants.%DefaultOrUnformed.facet.d8b]
|
||||
// CHECK:STDOUT: %as_type.loc16: type = facet_access_type %.loc16_15.1 [concrete = constants.%T.ed0]
|
||||
// CHECK:STDOUT: %.loc16_15.2: type = converted %.loc16_15.1, %as_type.loc16 [concrete = constants.%T.ed0]
|
||||
// CHECK:STDOUT: %DefaultOrUnformed.facet.loc15: %DefaultOrUnformed.type = facet_value constants.%T.ed0, (constants.%DefaultOrUnformed.impl_witness.307) [concrete = constants.%DefaultOrUnformed.facet.d8b]
|
||||
// CHECK:STDOUT: %.loc15_15.1: %DefaultOrUnformed.type = converted constants.%T.ed0, %DefaultOrUnformed.facet.loc15 [concrete = constants.%DefaultOrUnformed.facet.d8b]
|
||||
// CHECK:STDOUT: %as_type.loc15: type = facet_access_type %.loc15_15.1 [concrete = constants.%T.ed0]
|
||||
// CHECK:STDOUT: %.loc15_15.2: type = converted %.loc15_15.1, %as_type.loc15 [concrete = constants.%T.ed0]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %.loc16_3.1: ref %T.ed0 = splice_block %t.var {}
|
||||
// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc16: init %T.ed0 to %.loc16_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.2()
|
||||
// CHECK:STDOUT: assign %t.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc16
|
||||
// CHECK:STDOUT: %.loc16_13: type = splice_block %T.ref [concrete = constants.%T.ed0] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc16: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %.loc15_3.1: ref %T.ed0 = splice_block %t.var {}
|
||||
// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc15: init %T.ed0 to %.loc15_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.2()
|
||||
// CHECK:STDOUT: assign %t.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc15
|
||||
// CHECK:STDOUT: %.loc15_13: type = splice_block %T.ref [concrete = constants.%T.ed0] {
|
||||
// CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, imports.%T.decl [concrete = constants.%T.ed0]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %t: ref %T.ed0 = wrapper_binding t, %t.var
|
||||
@@ -1245,15 +1234,15 @@ fn PassConstRef(ref x: const XByRef) {
|
||||
// CHECK:STDOUT: %t.patt: %pattern_type.5f6 = ref_binding_pattern t [concrete = constants.%t.patt.420]
|
||||
// CHECK:STDOUT: %t.var_patt: %pattern_type.5f6 = var_pattern %t.patt [concrete = constants.%t.var_patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Cpp.ref.loc22: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesConstRValue.ref.loc22: %TakesConstRValue.cpp_overload_set.type = name_ref TakesConstRValue, imports.%TakesConstRValue.cpp_overload_set.value [concrete = constants.%TakesConstRValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %Cpp.ref.loc20: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
||||
// CHECK:STDOUT: %TakesConstRValue.ref.loc20: %TakesConstRValue.cpp_overload_set.type = name_ref TakesConstRValue, imports.%TakesConstRValue.cpp_overload_set.value [concrete = constants.%TakesConstRValue.cpp_overload_set.value]
|
||||
// CHECK:STDOUT: %t.ref: ref %T.ed0 = name_ref t, %t
|
||||
// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %.loc16_3.3: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.8f8]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%t.var)
|
||||
// CHECK:STDOUT: %SelfDestruct.call.loc15: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%t.var)
|
||||
// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.580]
|
||||
// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%S, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.580]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.580]
|
||||
|
||||
Reference in new issue
Block a user