| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199 |
- // 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/class/no_prelude/syntactic_merge.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon
- // --- basic.carbon
- library "[[@TEST_NAME]]";
- class C {}
- alias D = C;
- class Foo(a:! C);
- class Foo(a:! C) {}
- class Bar(a:! D);
- class Bar(a:! D) {}
- // --- spacing.carbon
- library "[[@TEST_NAME]]";
- class C {}
- class Foo [ ] ( a :! C );
- class Foo[](a:! C) {}
- // --- fail_parens.carbon
- library "[[@TEST_NAME]]";
- class C {}
- class Foo(a:! C);
- // CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:15: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
- // CHECK:STDERR: class Foo(a:! (C)) {}
- // CHECK:STDERR: ^
- // CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:15: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
- // CHECK:STDERR: class Foo(a:! C);
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- class Foo(a:! (C)) {}
- // --- todo_fail_raw_identifier.carbon
- library "[[@TEST_NAME]]";
- class C {}
- class Foo(a:! C);
- class Foo(a:! r#C) {}
- // --- two_file.carbon
- library "[[@TEST_NAME]]";
- class C {}
- alias D = C;
- class Foo(a:! C);
- class Bar(a:! D);
- // --- two_file.impl.carbon
- impl library "[[@TEST_NAME]]";
- class Foo(a:! C) {}
- class Bar(a:! D) {}
- // --- fail_name_mismatch.carbon
- library "[[@TEST_NAME]]";
- class C {}
- alias D = C;
- class Foo(a:! C);
- // CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:11: error: redeclaration differs at parameter 1 [RedeclParamDiffers]
- // CHECK:STDERR: class Foo(b:! D) {}
- // CHECK:STDERR: ^~~~~
- // CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:11: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
- // CHECK:STDERR: class Foo(a:! C);
- // CHECK:STDERR: ^~~~~
- // CHECK:STDERR:
- class Foo(b:! D) {}
- // --- fail_alias.carbon
- library "[[@TEST_NAME]]";
- class C {}
- alias D = C;
- class Foo(a:! C);
- // CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:15: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
- // CHECK:STDERR: class Foo(a:! D) {}
- // CHECK:STDERR: ^
- // CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:15: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
- // CHECK:STDERR: class Foo(a:! C);
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- class Foo(a:! D) {}
- // --- fail_deduced_alias.carbon
- library "[[@TEST_NAME]]";
- class C {}
- alias D = C;
- class Foo[a:! C]();
- // CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:15: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
- // CHECK:STDERR: class Foo[a:! D]() {}
- // CHECK:STDERR: ^
- // CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:15: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
- // CHECK:STDERR: class Foo[a:! C]();
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- class Foo[a:! D]() {}
- // --- alias_two_file.carbon
- library "[[@TEST_NAME]]";
- class C {}
- class Foo(a:! C);
- // --- todo_fail_alias_two_file.impl.carbon
- impl library "[[@TEST_NAME]]";
- alias D = C;
- class Foo(a:! D) {}
- // --- fail_repeat_const.carbon
- library "[[@TEST_NAME]]";
- class C {}
- class Foo(a:! const C);
- // CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+11]]:15: warning: `const` applied repeatedly to the same type has no additional effect [RepeatedConst]
- // CHECK:STDERR: class Foo(a:! const (const C)) {}
- // CHECK:STDERR: ^~~~~~~~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+7]]:21: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
- // CHECK:STDERR: class Foo(a:! const (const C)) {}
- // CHECK:STDERR: ^
- // CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:21: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
- // CHECK:STDERR: class Foo(a:! const C);
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- class Foo(a:! const (const C)) {}
- // --- fail_self_type.carbon
- library "[[@TEST_NAME]]";
- base class Base {
- var a: ();
- fn F[addr self: Self*]();
- }
- // CHECK:STDERR: fail_self_type.carbon:[[@LINE+7]]:22: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
- // CHECK:STDERR: fn Base.F[addr self: Base*]() {
- // CHECK:STDERR: ^~~~
- // CHECK:STDERR: fail_self_type.carbon:[[@LINE-6]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
- // CHECK:STDERR: fn F[addr self: Self*]();
- // CHECK:STDERR: ^~~~
- // CHECK:STDERR:
- fn Base.F[addr self: Base*]() {
- (*self).a = ();
- }
- // 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: <witness> = 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 = generic_class_type @Foo [template]
- // CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template]
- // CHECK:STDOUT: %Foo: type = class_type @Foo, @Foo(%a) [symbolic]
- // CHECK:STDOUT: %Bar.type: type = generic_class_type @Bar [template]
- // CHECK:STDOUT: %Bar.generic: %Bar.type = struct_value () [template]
- // CHECK:STDOUT: %Bar: type = class_type @Bar, @Bar(%a) [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = 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 = class_decl @Foo [template = constants.%Foo.generic] {
- // CHECK:STDOUT: %a.patt.loc8: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc8, runtime_param<none> [symbolic = constants.%a.patt]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param.loc7 [symbolic = %a.loc7_11.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Foo.decl.loc8: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] {
- // CHECK:STDOUT: %a.patt.loc8: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc8, runtime_param<none> [symbolic = constants.%a.patt]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param.loc8: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %a.loc8: %C = bind_symbolic_name a, 0, %a.param.loc8 [symbolic = constants.%a]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Bar.decl.loc10: %Bar.type = class_decl @Bar [template = constants.%Bar.generic] {
- // CHECK:STDOUT: %a.patt.loc11: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc11, runtime_param<none> [symbolic = constants.%a.patt]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param.loc10: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %D.ref.loc10: type = name_ref D, file.%D [template = constants.%C]
- // CHECK:STDOUT: %a.loc10_11.1: %C = bind_symbolic_name a, 0, %a.param.loc10 [symbolic = %a.loc10_11.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Bar.decl.loc11: %Bar.type = class_decl @Bar [template = constants.%Bar.generic] {
- // CHECK:STDOUT: %a.patt.loc11: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc11, runtime_param<none> [symbolic = constants.%a.patt]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param.loc11: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D [template = constants.%C]
- // CHECK:STDOUT: %a.loc11: %C = bind_symbolic_name a, 0, %a.param.loc11 [symbolic = constants.%a]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = 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 class @Foo(%a.loc7_11.1: %C) {
- // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_11.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc7: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %complete_type: <witness> = 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.%Foo
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @Bar(%a.loc10_11.1: %C) {
- // CHECK:STDOUT: %a.loc10_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc10_11.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc10: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc10 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %complete_type: <witness> = 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.%Bar
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Foo(constants.%a) {
- // CHECK:STDOUT: %a.loc7_11.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc7 => constants.%a
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Bar(constants.%a) {
- // CHECK:STDOUT: %a.loc10_11.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc10 => constants.%a
- // 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: <witness> = 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 = generic_class_type @Foo [template]
- // CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template]
- // CHECK:STDOUT: %Foo: type = class_type @Foo, @Foo(%a) [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = 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 = class_decl @Foo [template = constants.%Foo.generic] {
- // CHECK:STDOUT: %a.patt.loc7: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7, runtime_param<none> [symbolic = constants.%a.patt]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %a.loc6_17.1: %C = bind_symbolic_name a, 0, %a.param.loc6 [symbolic = %a.loc6_17.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] {
- // CHECK:STDOUT: %a.patt.loc7: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7, runtime_param<none> [symbolic = constants.%a.patt]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %a.loc7: %C = bind_symbolic_name a, 0, %a.param.loc7 [symbolic = constants.%a]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = 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 class @Foo(%a.loc6_17.1: %C) {
- // CHECK:STDOUT: %a.loc6_17.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_17.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc6: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %complete_type: <witness> = 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.%Foo
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Foo(constants.%a) {
- // CHECK:STDOUT: %a.loc6_17.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc6 => constants.%a
- // 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: <witness> = 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 = generic_class_type @Foo [template]
- // CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template]
- // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template]
- // CHECK:STDOUT: %.generic: %.type = struct_value () [template]
- // CHECK:STDOUT: %.cb8: type = class_type @.1, @.1(%a) [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = 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 = class_decl @Foo [template = constants.%Foo.generic] {
- // CHECK:STDOUT: %a.patt.loc6_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_11.1, runtime_param<none> [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %a.loc6_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_11.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] {
- // CHECK:STDOUT: %a.patt.loc14_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc14_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc14_11.1, runtime_param<none> [symbolic = %a.patt.loc14_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %a.loc14_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc14_11.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = 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 class @Foo(%a.loc6_11.1: %C) {
- // CHECK:STDOUT: %a.loc6_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_11.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc6_11.2: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @.1(%a.loc14_11.1: %C) {
- // CHECK:STDOUT: %a.loc14_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc14_11.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc14_11.2: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc14_11.2 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %complete_type: <witness> = 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.%.cb8
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Foo(constants.%a) {
- // CHECK:STDOUT: %a.loc6_11.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc6_11.2 => constants.%a
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @.1(constants.%a) {
- // CHECK:STDOUT: %a.loc14_11.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc14_11.2 => constants.%a
- // 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: <witness> = 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 = generic_class_type @Foo [template]
- // CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template]
- // CHECK:STDOUT: %Foo: type = class_type @Foo, @Foo(%a) [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = 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 = class_decl @Foo [template = constants.%Foo.generic] {
- // CHECK:STDOUT: %a.patt.loc7: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7, runtime_param<none> [symbolic = constants.%a.patt]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %a.loc6_11.1: %C = bind_symbolic_name a, 0, %a.param.loc6 [symbolic = %a.loc6_11.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] {
- // CHECK:STDOUT: %a.patt.loc7: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7, runtime_param<none> [symbolic = constants.%a.patt]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %a.loc7: %C = bind_symbolic_name a, 0, %a.param.loc7 [symbolic = constants.%a]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = 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 class @Foo(%a.loc6_11.1: %C) {
- // CHECK:STDOUT: %a.loc6_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_11.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc6: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %complete_type: <witness> = 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.%Foo
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Foo(constants.%a) {
- // CHECK:STDOUT: %a.loc6_11.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc6 => constants.%a
- // 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: <witness> = 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 = generic_class_type @Foo [template]
- // CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template]
- // CHECK:STDOUT: %Bar.type: type = generic_class_type @Bar [template]
- // CHECK:STDOUT: %Bar.generic: %Bar.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = 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 = class_decl @Foo [template = constants.%Foo.generic] {
- // CHECK:STDOUT: %a.patt.loc7_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_11.1, runtime_param<none> [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_11.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Bar.decl: %Bar.type = class_decl @Bar [template = constants.%Bar.generic] {
- // CHECK:STDOUT: %a.patt.loc8_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc8_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc8_11.1, runtime_param<none> [symbolic = %a.patt.loc8_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
- // CHECK:STDOUT: %a.loc8_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc8_11.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = 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 class @Foo(%a.loc7_11.1: %C) {
- // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_11.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc7_11.2: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @Bar(%a.loc8_11.1: %C) {
- // CHECK:STDOUT: %a.loc8_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc8_11.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc8_11.2: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc8_11.2 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Foo(constants.%a) {
- // CHECK:STDOUT: %a.loc7_11.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc7_11.2 => constants.%a
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Bar(constants.%a) {
- // CHECK:STDOUT: %a.loc8_11.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc8_11.2 => constants.%a
- // CHECK:STDOUT: }
- // 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: <witness> = 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 = generic_class_type @Foo [template]
- // CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template]
- // CHECK:STDOUT: %Foo: type = class_type @Foo, @Foo(%a) [symbolic]
- // CHECK:STDOUT: %Bar.type: type = generic_class_type @Bar [template]
- // CHECK:STDOUT: %Bar.generic: %Bar.type = struct_value () [template]
- // CHECK:STDOUT: %Bar: type = class_type @Bar, @Bar(%a) [symbolic]
- // 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: <witness> = 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: %Main.import_ref.11fba2.1: %C = import_ref Main//two_file, loc7_11, loaded [symbolic = @Foo.%a.1 (constants.%a)]
- // CHECK:STDOUT: %Main.import_ref.11fba2.2: %C = import_ref Main//two_file, loc8_11, loaded [symbolic = @Bar.%a.1 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = 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 <none>
- // CHECK:STDOUT: %default.import.loc2_6.2 = import <none>
- // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] {
- // CHECK:STDOUT: %a.patt.loc4: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc4, runtime_param<none> [symbolic = constants.%a.patt]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [template = constants.%C]
- // CHECK:STDOUT: %a.loc4: %C = bind_symbolic_name a, 0, %a.param [symbolic = constants.%a]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Bar.decl: %Bar.type = class_decl @Bar [template = constants.%Bar.generic] {
- // CHECK:STDOUT: %a.patt.loc5: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc5, runtime_param<none> [symbolic = constants.%a.patt]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [template = constants.%C]
- // CHECK:STDOUT: %a.loc5: %C = bind_symbolic_name a, 0, %a.param [symbolic = constants.%a]
- // 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: generic class @Foo(imports.%Main.import_ref.11fba2.1: %C) {
- // CHECK:STDOUT: %a.1: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)]
- // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.1 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %complete_type: <witness> = 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.%Foo
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @Bar(imports.%Main.import_ref.11fba2.2: %C) {
- // CHECK:STDOUT: %a.1: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)]
- // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.1 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %complete_type: <witness> = 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.%Bar
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Foo(constants.%a) {
- // CHECK:STDOUT: %a.1 => constants.%a
- // CHECK:STDOUT: %a.patt.1 => constants.%a
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Bar(constants.%a) {
- // CHECK:STDOUT: %a.1 => constants.%a
- // CHECK:STDOUT: %a.patt.1 => constants.%a
- // 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: <witness> = 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 = generic_class_type @Foo [template]
- // CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template]
- // CHECK:STDOUT: %b: %C = bind_symbolic_name b, 0 [symbolic]
- // CHECK:STDOUT: %b.patt: %C = symbolic_binding_pattern b, 0 [symbolic]
- // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template]
- // CHECK:STDOUT: %.generic: %.type = struct_value () [template]
- // CHECK:STDOUT: %.cb8: type = class_type @.1, @.1(%b) [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = 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 = class_decl @Foo [template = constants.%Foo.generic] {
- // CHECK:STDOUT: %a.patt.loc7_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_11.1, runtime_param<none> [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_11.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] {
- // CHECK:STDOUT: %b.patt.loc15_11.1: %C = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc15_11.2 (constants.%b.patt)]
- // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt.loc15_11.1, runtime_param<none> [symbolic = %b.patt.loc15_11.2 (constants.%b.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %b.param: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
- // CHECK:STDOUT: %b.loc15_11.1: %C = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc15_11.2 (constants.%b)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = 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 class @Foo(%a.loc7_11.1: %C) {
- // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_11.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc7_11.2: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @.1(%b.loc15_11.1: %C) {
- // CHECK:STDOUT: %b.loc15_11.2: %C = bind_symbolic_name b, 0 [symbolic = %b.loc15_11.2 (constants.%b)]
- // CHECK:STDOUT: %b.patt.loc15_11.2: %C = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc15_11.2 (constants.%b.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %complete_type: <witness> = 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.%.cb8
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Foo(constants.%a) {
- // CHECK:STDOUT: %a.loc7_11.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc7_11.2 => constants.%a
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @.1(constants.%b) {
- // CHECK:STDOUT: %b.loc15_11.2 => constants.%b
- // CHECK:STDOUT: %b.patt.loc15_11.2 => constants.%b
- // 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: <witness> = 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 = generic_class_type @Foo [template]
- // CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template]
- // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template]
- // CHECK:STDOUT: %.generic: %.type = struct_value () [template]
- // CHECK:STDOUT: %.cb8: type = class_type @.1, @.1(%a) [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = 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 = class_decl @Foo [template = constants.%Foo.generic] {
- // CHECK:STDOUT: %a.patt.loc7_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_11.1, runtime_param<none> [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_11.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] {
- // CHECK:STDOUT: %a.patt.loc15_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_11.1, runtime_param<none> [symbolic = %a.patt.loc15_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
- // CHECK:STDOUT: %a.loc15_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc15_11.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = 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 class @Foo(%a.loc7_11.1: %C) {
- // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_11.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc7_11.2: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @.1(%a.loc15_11.1: %C) {
- // CHECK:STDOUT: %a.loc15_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc15_11.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc15_11.2: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_11.2 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %complete_type: <witness> = 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.%.cb8
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Foo(constants.%a) {
- // CHECK:STDOUT: %a.loc7_11.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc7_11.2 => constants.%a
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @.1(constants.%a) {
- // CHECK:STDOUT: %a.loc15_11.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc15_11.2 => constants.%a
- // 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: <witness> = 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 = generic_class_type @Foo [template]
- // CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template]
- // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template]
- // CHECK:STDOUT: %.generic: %.type = struct_value () [template]
- // CHECK:STDOUT: %.cb8: type = class_type @.1, @.1(%a) [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = 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 = class_decl @Foo [template = constants.%Foo.generic] {
- // CHECK:STDOUT: %a.patt.loc7_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_11.1, runtime_param<none> [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_11.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] {
- // CHECK:STDOUT: %a.patt.loc15_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_11.1, runtime_param<none> [symbolic = %a.patt.loc15_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
- // CHECK:STDOUT: %a.loc15_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc15_11.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = 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 class @Foo(%a.loc7_11.1: %C) {
- // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_11.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc7_11.2: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @.1(%a.loc15_11.1: %C) {
- // CHECK:STDOUT: %a.loc15_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc15_11.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc15_11.2: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_11.2 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %complete_type: <witness> = 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.%.cb8
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Foo(constants.%a) {
- // CHECK:STDOUT: %a.loc7_11.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc7_11.2 => constants.%a
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @.1(constants.%a) {
- // CHECK:STDOUT: %a.loc15_11.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc15_11.2 => constants.%a
- // 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: <witness> = 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 = generic_class_type @Foo [template]
- // CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = 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 = class_decl @Foo [template = constants.%Foo.generic] {
- // CHECK:STDOUT: %a.patt.loc6_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_11.1, runtime_param<none> [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %a.loc6_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_11.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = 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 class @Foo(%a.loc6_11.1: %C) {
- // CHECK:STDOUT: %a.loc6_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_11.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc6_11.2: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Foo(constants.%a) {
- // CHECK:STDOUT: %a.loc6_11.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc6_11.2 => constants.%a
- // CHECK:STDOUT: }
- // 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: <witness> = 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 = generic_class_type @Foo [template]
- // CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template]
- // CHECK:STDOUT: %Foo: type = class_type @Foo, @Foo(%a) [symbolic]
- // 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: <witness> = 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: %Main.import_ref.11f: %C = import_ref Main//alias_two_file, loc6_11, loaded [symbolic = @Foo.%a.1 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = 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 <none>
- // CHECK:STDOUT: %default.import.loc2_6.2 = import <none>
- // 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 = class_decl @Foo [template = constants.%Foo.generic] {
- // CHECK:STDOUT: %a.patt.loc6: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt]
- // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6, runtime_param<none> [symbolic = constants.%a.patt]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %C = value_param runtime_param<none>
- // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
- // CHECK:STDOUT: %a.loc6: %C = bind_symbolic_name a, 0, %a.param [symbolic = constants.%a]
- // 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: generic class @Foo(imports.%Main.import_ref.11f: %C) {
- // CHECK:STDOUT: %a.1: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)]
- // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.1 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %complete_type: <witness> = 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.%Foo
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Foo(constants.%a) {
- // CHECK:STDOUT: %a.1 => constants.%a
- // CHECK:STDOUT: %a.patt.1 => constants.%a
- // 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: <witness> = complete_type_witness %empty_struct_type [template]
- // CHECK:STDOUT: %const: type = const_type %C [template]
- // CHECK:STDOUT: %a: %const = bind_symbolic_name a, 0 [symbolic]
- // CHECK:STDOUT: %a.patt: %const = symbolic_binding_pattern a, 0 [symbolic]
- // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template]
- // CHECK:STDOUT: %Foo.generic: %Foo.type = struct_value () [template]
- // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template]
- // CHECK:STDOUT: %.generic: %.type = struct_value () [template]
- // CHECK:STDOUT: %.8e9: type = class_type @.1, @.1(%a) [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = 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 = class_decl @Foo [template = constants.%Foo.generic] {
- // CHECK:STDOUT: %a.patt.loc6_11.1: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt.loc6_11.1, runtime_param<none> [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %const = value_param runtime_param<none>
- // 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.loc6_11.1: %const = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_11.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] {
- // CHECK:STDOUT: %a.patt.loc18_11.1: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc18_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt.loc18_11.1, runtime_param<none> [symbolic = %a.patt.loc18_11.2 (constants.%a.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %const = value_param runtime_param<none>
- // CHECK:STDOUT: %.loc18: type = splice_block %const.loc18_15 [template = constants.%const] {
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %const.loc18_22: type = const_type %C [template = constants.%const]
- // CHECK:STDOUT: %const.loc18_15: type = const_type %const [template = constants.%const]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a.loc18_11.1: %const = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc18_11.2 (constants.%a)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = 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 class @Foo(%a.loc6_11.1: %const) {
- // CHECK:STDOUT: %a.loc6_11.2: %const = bind_symbolic_name a, 0 [symbolic = %a.loc6_11.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc6_11.2: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @.1(%a.loc18_11.1: %const) {
- // CHECK:STDOUT: %a.loc18_11.2: %const = bind_symbolic_name a, 0 [symbolic = %a.loc18_11.2 (constants.%a)]
- // CHECK:STDOUT: %a.patt.loc18_11.2: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc18_11.2 (constants.%a.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %complete_type: <witness> = 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.%.8e9
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Foo(constants.%a) {
- // CHECK:STDOUT: %a.loc6_11.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc6_11.2 => constants.%a
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @.1(constants.%a) {
- // CHECK:STDOUT: %a.loc18_11.2 => constants.%a
- // CHECK:STDOUT: %a.patt.loc18_11.2 => constants.%a
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_self_type.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %Base: type = class_type @Base [template]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
- // CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %empty_tuple.type [template]
- // CHECK:STDOUT: %ptr.11f: type = ptr_type %Base [template]
- // CHECK:STDOUT: %F.type: type = fn_type @F [template]
- // CHECK:STDOUT: %F: %F.type = struct_value () [template]
- // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.a [template]
- // CHECK:STDOUT: %.type: type = fn_type @.1 [template]
- // CHECK:STDOUT: %.ad0: %.type = struct_value () [template]
- // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Base = %Base.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} {}
- // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.ad0] {
- // CHECK:STDOUT: %self.patt: %ptr.11f = binding_pattern self
- // CHECK:STDOUT: %self.param_patt: %ptr.11f = value_param_pattern %self.patt, runtime_param0
- // CHECK:STDOUT: %.loc17_11: auto = addr_pattern %self.param_patt
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: %ptr.11f = value_param runtime_param0
- // CHECK:STDOUT: %.loc17_26: type = splice_block %ptr [template = constants.%ptr.11f] {
- // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base]
- // CHECK:STDOUT: %ptr: type = ptr_type %Base [template = constants.%ptr.11f]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %self: %ptr.11f = bind_name self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @Base {
- // CHECK:STDOUT: %.loc5_8: %Base.elem = field_decl a, element0 [template]
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %.loc5_3: %Base.elem = var_pattern %.loc5_8
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.var: ref %Base.elem = var <none>
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
- // CHECK:STDOUT: %self.patt: %ptr.11f = binding_pattern self
- // CHECK:STDOUT: %self.param_patt: %ptr.11f = value_param_pattern %self.patt, runtime_param0
- // CHECK:STDOUT: %.loc7_8: auto = addr_pattern %self.param_patt
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: %ptr.11f = value_param runtime_param0
- // CHECK:STDOUT: %.loc7_23: type = splice_block %ptr [template = constants.%ptr.11f] {
- // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base]
- // CHECK:STDOUT: %ptr: type = ptr_type %Base [template = constants.%ptr.11f]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %self: %ptr.11f = bind_name self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.a [template = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%Base
- // CHECK:STDOUT: .a = %.loc5_8
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F[addr %self.param_patt: %ptr.11f]();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @.1[addr %self.param_patt: %ptr.11f]() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %self.ref: %ptr.11f = name_ref self, %self
- // CHECK:STDOUT: %.loc18_4: ref %Base = deref %self.ref
- // CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc5_8 [template = @Base.%.loc5_8]
- // CHECK:STDOUT: %.loc18_10: ref %empty_tuple.type = class_element_access %.loc18_4, element0
- // CHECK:STDOUT: %.loc18_16.1: %empty_tuple.type = tuple_literal ()
- // CHECK:STDOUT: %.loc18_16.2: init %empty_tuple.type = tuple_init () to %.loc18_10 [template = constants.%empty_tuple]
- // CHECK:STDOUT: %.loc18_13: init %empty_tuple.type = converted %.loc18_16.1, %.loc18_16.2 [template = constants.%empty_tuple]
- // CHECK:STDOUT: assign %.loc18_10, %.loc18_13
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
|