// Part of the Carbon Language project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE // TIP: To test this file alone, run: // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon // --- basic.carbon library "[[@TEST_NAME]]"; class C {} alias D = C; fn Foo(a: C); fn Foo(a: C) {} fn Bar(a: D); fn Bar(a: D) {} // --- spacing.carbon library "[[@TEST_NAME]]"; class C {} fn Foo [ ] ( a : C ); fn Foo[](a: C) {} // --- fail_parens.carbon library "[[@TEST_NAME]]"; class C {} fn Foo(a: C); // CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:11: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: fn Foo(a: (C)) {} // CHECK:STDERR: ^ // CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:11: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: fn Foo(a: C); // CHECK:STDERR: ^ // CHECK:STDERR: fn Foo(a: (C)) {} // --- todo_fail_raw_identifier.carbon library "[[@TEST_NAME]]"; class C {} fn Foo(a: C); fn Foo(a: r#C) {} // --- two_file.carbon library "[[@TEST_NAME]]"; class C {} alias D = C; fn Foo(a: C); fn Bar(a: D); // --- two_file.impl.carbon impl library "[[@TEST_NAME]]"; fn Foo(a: C) {} fn Bar(a: D) {} // --- fail_name_mismatch.carbon library "[[@TEST_NAME]]"; class C {} alias D = C; fn Foo(a: C); // CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:8: error: redeclaration differs at parameter 1 [RedeclParamDiffers] // CHECK:STDERR: fn Foo(b: D) {} // CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:8: note: previous declaration's corresponding parameter here [RedeclParamPrevious] // CHECK:STDERR: fn Foo(a: C); // CHECK:STDERR: ^~~~ // CHECK:STDERR: fn Foo(b: D) {} // --- fail_alias.carbon library "[[@TEST_NAME]]"; class C {} alias D = C; fn Foo(a: C); // CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:11: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: fn Foo(a: D) {} // CHECK:STDERR: ^ // CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:11: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: fn Foo(a: C); // CHECK:STDERR: ^ // CHECK:STDERR: fn Foo(a: D) {} // --- fail_deduced_alias.carbon library "[[@TEST_NAME]]"; class C {} alias D = C; fn Foo[a:! C](); // CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:12: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: fn Foo[a:! D]() {} // CHECK:STDERR: ^ // CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:12: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: fn Foo[a:! C](); // CHECK:STDERR: ^ // CHECK:STDERR: fn Foo[a:! D]() {} // --- todo_fail_alias_in_return.carbon library "[[@TEST_NAME]]"; class C {} alias D = C; fn Foo() -> C; fn Foo() -> D { return {}; } // --- alias_two_file.carbon library "[[@TEST_NAME]]"; class C {} fn Foo(a: C); // --- todo_fail_alias_two_file.impl.carbon impl library "[[@TEST_NAME]]"; alias D = C; fn Foo(a: D) {} // --- fail_repeat_const.carbon library "[[@TEST_NAME]]"; class C {} fn Foo(a: const C); // CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+11]]:11: warning: `const` applied repeatedly to the same type has no additional effect [RepeatedConst] // CHECK:STDERR: fn Foo(a: const (const C)) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+7]]:17: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: fn Foo(a: const (const C)) {} // CHECK:STDERR: ^ // CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:17: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: fn Foo(a: const C); // CHECK:STDERR: ^ // CHECK:STDERR: fn Foo(a: const (const C)) {} // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] // CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .D = %D // CHECK:STDOUT: .Foo = %Foo.decl.loc7 // CHECK:STDOUT: .Bar = %Bar.decl.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param0 // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7: %C = bind_name a, %a.param.loc7 // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc8: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param.loc8: %C = value_param runtime_param0 // CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc8: %C = bind_name a, %a.param.loc8 // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc10: %Bar.type = fn_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param.loc10: %C = value_param runtime_param0 // CHECK:STDOUT: %D.ref.loc10: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc10: %C = bind_name a, %a.param.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc11: %Bar.type = fn_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param.loc11: %C = value_param runtime_param0 // CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc11: %C = bind_name a, %a.param.loc11 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bar(%a.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- spacing.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .Foo = %Foo.decl.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param0 // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc6: %C = bind_name a, %a.param.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param0 // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7: %C = bind_name a, %a.param.loc7 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo[](%a.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_parens.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] // CHECK:STDOUT: %.d85: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.d85] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C); // CHECK:STDOUT: // CHECK:STDOUT: fn @.1(%a.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- todo_fail_raw_identifier.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .Foo = %Foo.decl.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param0 // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc6: %C = bind_name a, %a.param.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param0 // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7: %C = bind_name a, %a.param.loc7 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- two_file.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] // CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .D = %D // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: .Bar = %Bar.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type = fn_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C); // CHECK:STDOUT: // CHECK:STDOUT: fn @Bar(%a.param_patt: %C); // CHECK:STDOUT: // CHECK:STDOUT: --- two_file.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] // CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//two_file, C, loaded [template = constants.%C] // CHECK:STDOUT: %Main.D: type = import_ref Main//two_file, D, loaded [template = constants.%C] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//two_file, loc4_10, loaded [template = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//two_file, inst14 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = imports.%Main.C // CHECK:STDOUT: .D = imports.%Main.D // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: .Bar = %Bar.decl // CHECK:STDOUT: } // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type = fn_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C [from "two_file.carbon"] { // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f2 // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.2c4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C) [from "two_file.carbon"] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bar(%a.param_patt: %C) [from "two_file.carbon"] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_name_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] // CHECK:STDOUT: %.d85: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .D = %D // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.d85] { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %b.param: %C = value_param runtime_param0 // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C); // CHECK:STDOUT: // CHECK:STDOUT: fn @.1(%b.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_alias.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] // CHECK:STDOUT: %.d85: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .D = %D // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.d85] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C); // CHECK:STDOUT: // CHECK:STDOUT: fn @.1(%a.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduced_alias.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] // CHECK:STDOUT: %.d85: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .D = %D // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt.loc7_8.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_8.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_8.1, runtime_param [symbolic = %a.patt.loc7_8.2 (constants.%a.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7_8.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_8.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.d85] { // CHECK:STDOUT: %a.patt.loc15_8.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_8.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_8.1, runtime_param [symbolic = %a.patt.loc15_8.2 (constants.%a.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc15_8.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc15_8.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Foo(%a.loc7_8.1: %C) { // CHECK:STDOUT: %a.loc7_8.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_8.2 (constants.%a)] // CHECK:STDOUT: %a.patt.loc7_8.2: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_8.2 (constants.%a.patt)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%a.param_patt: %C](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @.1(%a.loc15_8.1: %C) { // CHECK:STDOUT: %a.loc15_8.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc15_8.2 (constants.%a)] // CHECK:STDOUT: %a.patt.loc15_8.2: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_8.2 (constants.%a.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn[%a.param_patt: %C]() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Foo(constants.%a) { // CHECK:STDOUT: %a.loc7_8.2 => constants.%a // CHECK:STDOUT: %a.patt.loc7_8.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @.1(constants.%a) { // CHECK:STDOUT: %a.loc15_8.2 => constants.%a // CHECK:STDOUT: %a.patt.loc15_8.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- todo_fail_alias_in_return.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .D = %D // CHECK:STDOUT: .Foo = %Foo.decl.loc7 // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.param.loc7: ref %C = out_param runtime_param0 // CHECK:STDOUT: %return.loc7: ref %C = return_slot %return.param.loc7 // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc8: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %return.param.loc8: ref %C = out_param runtime_param0 // CHECK:STDOUT: %return.loc8: ref %C = return_slot %return.param.loc8 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() -> %return.param_patt: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc8_25.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc8_25.2: init %C = class_init (), %return.loc8 [template = constants.%C.val] // CHECK:STDOUT: %.loc8_26: init %C = converted %.loc8_25.1, %.loc8_25.2 [template = constants.%C.val] // CHECK:STDOUT: return %.loc8_26 to %return.loc8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- alias_two_file.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C); // CHECK:STDOUT: // CHECK:STDOUT: --- todo_fail_alias_two_file.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//alias_two_file, C, loaded [template = constants.%C] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//alias_two_file, loc4_10, loaded [template = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//alias_two_file, inst14 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = imports.%Main.C // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: .D = %D // CHECK:STDOUT: } // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, imports.%Main.C [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C [from "alias_two_file.carbon"] { // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f2 // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.2c4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %C) [from "alias_two_file.carbon"] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_repeat_const.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %const: type = const_type %C [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] // CHECK:STDOUT: %.d85: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %const = binding_pattern a // CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %const = value_param runtime_param0 // CHECK:STDOUT: %.loc6: type = splice_block %const [template = constants.%const] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %const: type = const_type %C [template = constants.%const] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %const = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.d85] { // CHECK:STDOUT: %a.patt: %const = binding_pattern a // CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %const = value_param runtime_param0 // CHECK:STDOUT: %.loc18: type = splice_block %const.loc18_11 [template = constants.%const] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %const.loc18_18: type = const_type %C [template = constants.%const] // CHECK:STDOUT: %const.loc18_11: type = const_type %const [template = constants.%const] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %const = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(%a.param_patt: %const); // CHECK:STDOUT: // CHECK:STDOUT: fn @.1(%a.param_patt: %const) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: