|
@@ -0,0 +1,1056 @@
|
|
|
|
|
+// 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/generic/base_is_generic.carbon
|
|
|
|
|
+// TIP: To dump output, run:
|
|
|
|
|
+// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/generic/base_is_generic.carbon
|
|
|
|
|
+
|
|
|
|
|
+// --- extend_generic_base.carbon
|
|
|
|
|
+
|
|
|
|
|
+library "[[@TEST_NAME]]";
|
|
|
|
|
+
|
|
|
|
|
+base class Base(T:! type) {
|
|
|
|
|
+ var x: T;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+class Param {
|
|
|
|
|
+ var y: i32;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+class Derived {
|
|
|
|
|
+ extend base: Base(Param);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+fn DoubleFieldAccess(d: Derived) -> i32 {
|
|
|
|
|
+ return d.x.y;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// --- import.carbon
|
|
|
|
|
+
|
|
|
|
|
+library "[[@TEST_NAME]]";
|
|
|
|
|
+
|
|
|
|
|
+import library "extend_generic_base";
|
|
|
|
|
+
|
|
|
|
|
+fn ImportedDoubleFieldAccess(d: Derived) -> i32 {
|
|
|
|
|
+ return d.x.y;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// --- fail_todo_extend_symbolic_base.carbon
|
|
|
|
|
+
|
|
|
|
|
+library "[[@TEST_NAME]]";
|
|
|
|
|
+
|
|
|
|
|
+class C(T:! type) {
|
|
|
|
|
+ // CHECK:STDERR: fail_todo_extend_symbolic_base.carbon:[[@LINE+4]]:16: error: deriving from final type `T`; base type must be an `abstract` or `base` class [BaseIsFinal]
|
|
|
|
|
+ // CHECK:STDERR: extend base: T;
|
|
|
|
|
+ // CHECK:STDERR: ^
|
|
|
|
|
+ // CHECK:STDERR:
|
|
|
|
|
+ extend base: T;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+base class X {
|
|
|
|
|
+ fn G() {}
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+fn F() {
|
|
|
|
|
+ C(X).G();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// --- extend_generic_symbolic_base.carbon
|
|
|
|
|
+
|
|
|
|
|
+library "[[@TEST_NAME]]";
|
|
|
|
|
+
|
|
|
|
|
+base class X(U:! type) {
|
|
|
|
|
+ fn G() -> U { return G(); }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+class C(T:! type) {
|
|
|
|
|
+ extend base: X(T);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+fn F() {
|
|
|
|
|
+ let i: i32 = C(i32).G();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+// --- fail_todo_import_extend_generic_symbolic_base.carbon
|
|
|
|
|
+
|
|
|
|
|
+library "[[@TEST_NAME]]";
|
|
|
|
|
+
|
|
|
|
|
+import library "extend_generic_symbolic_base";
|
|
|
|
|
+
|
|
|
|
|
+fn H() {
|
|
|
|
|
+ // CHECK:STDERR: fail_todo_import_extend_generic_symbolic_base.carbon:[[@LINE+6]]:3: error: cannot implicitly convert from `T` to `i32` [ImplicitAsConversionFailure]
|
|
|
|
|
+ // CHECK:STDERR: let j: i32 = C(i32).G();
|
|
|
|
|
+ // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
+ // CHECK:STDERR: fail_todo_import_extend_generic_symbolic_base.carbon:[[@LINE+3]]:3: note: type `T` does not implement interface `ImplicitAs(i32)` [MissingImplInMemberAccessNote]
|
|
|
|
|
+ // CHECK:STDERR: let j: i32 = C(i32).G();
|
|
|
|
|
+ // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
+ let j: i32 = C(i32).G();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// CHECK:STDOUT: --- extend_generic_base.carbon
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: constants {
|
|
|
|
|
+// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %Base.type: type = generic_class_type @Base [template]
|
|
|
|
|
+// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
|
|
|
|
+// CHECK:STDOUT: %Base.1: %Base.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %Base.2: type = class_type @Base, @Base(%T) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.1: type = unbound_element_type %Base.2, %T [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.2: type = struct_type {.x: %T} [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.3: <witness> = complete_type_witness %.2 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %Param: type = class_type @Param [template]
|
|
|
|
|
+// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
|
|
|
|
+// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %.4: type = unbound_element_type %Param, i32 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.5: type = struct_type {.y: i32} [template]
|
|
|
|
|
+// CHECK:STDOUT: %.6: <witness> = complete_type_witness %.5 [template]
|
|
|
|
|
+// CHECK:STDOUT: %Derived: type = class_type @Derived [template]
|
|
|
|
|
+// CHECK:STDOUT: %Base.3: type = class_type @Base, @Base(%Param) [template]
|
|
|
|
|
+// CHECK:STDOUT: %.7: type = unbound_element_type %Base.3, %Param [template]
|
|
|
|
|
+// CHECK:STDOUT: %.8: type = struct_type {.x: %Param} [template]
|
|
|
|
|
+// CHECK:STDOUT: %.9: <witness> = complete_type_witness %.8 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.10: type = ptr_type %.5 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.11: type = struct_type {.x: %.10} [template]
|
|
|
|
|
+// CHECK:STDOUT: %.12: type = ptr_type %.8 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.13: type = unbound_element_type %Derived, %Base.3 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.14: type = struct_type {.base: %Base.3} [template]
|
|
|
|
|
+// CHECK:STDOUT: %.15: <witness> = complete_type_witness %.14 [template]
|
|
|
|
|
+// CHECK:STDOUT: %DoubleFieldAccess.type: type = fn_type @DoubleFieldAccess [template]
|
|
|
|
|
+// CHECK:STDOUT: %DoubleFieldAccess: %DoubleFieldAccess.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %.16: type = struct_type {.base: %.12} [template]
|
|
|
|
|
+// CHECK:STDOUT: %.17: type = ptr_type %.14 [template]
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: imports {
|
|
|
|
|
+// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
|
|
|
+// CHECK:STDOUT: .Int32 = %import_ref
|
|
|
|
|
+// CHECK:STDOUT: import Core//prelude
|
|
|
|
|
+// CHECK:STDOUT: import Core//prelude/...
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32]
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: file {
|
|
|
|
|
+// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
|
|
+// CHECK:STDOUT: .Core = imports.%Core
|
|
|
|
|
+// CHECK:STDOUT: .Base = %Base.decl
|
|
|
|
|
+// CHECK:STDOUT: .Param = %Param.decl
|
|
|
|
|
+// CHECK:STDOUT: .Derived = %Derived.decl
|
|
|
|
|
+// CHECK:STDOUT: .DoubleFieldAccess = %DoubleFieldAccess.decl
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: %Core.import = import Core
|
|
|
|
|
+// CHECK:STDOUT: %Base.decl: %Base.type = class_decl @Base [template = constants.%Base.1] {
|
|
|
|
|
+// CHECK:STDOUT: %T.patt.loc4_17.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)]
|
|
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_17.1, runtime_param<invalid> [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)]
|
|
|
|
|
+// CHECK:STDOUT: } {
|
|
|
|
|
+// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
|
|
+// CHECK:STDOUT: %T.loc4_17.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_17.2 (constants.%T)]
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: %Param.decl: type = class_decl @Param [template = constants.%Param] {} {}
|
|
|
|
|
+// CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} {}
|
|
|
|
|
+// CHECK:STDOUT: %DoubleFieldAccess.decl: %DoubleFieldAccess.type = fn_decl @DoubleFieldAccess [template = constants.%DoubleFieldAccess] {
|
|
|
|
|
+// CHECK:STDOUT: %d.patt: %Derived = binding_pattern d
|
|
|
|
|
+// CHECK:STDOUT: %d.param_patt: %Derived = value_param_pattern %d.patt, runtime_param0
|
|
|
|
|
+// CHECK:STDOUT: %return.patt: i32 = return_slot_pattern
|
|
|
|
|
+// CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1
|
|
|
|
|
+// CHECK:STDOUT: } {
|
|
|
|
|
+// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived]
|
|
|
|
|
+// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %.loc16_37.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %.loc16_37.2: type = converted %int.make_type_32, %.loc16_37.1 [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %d.param: %Derived = value_param runtime_param0
|
|
|
|
|
+// CHECK:STDOUT: %d: %Derived = bind_name d, %d.param
|
|
|
|
|
+// CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1
|
|
|
|
|
+// CHECK:STDOUT: %return: ref i32 = return_slot %return.param
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: generic class @Base(%T.loc4_17.1: type) {
|
|
|
|
|
+// CHECK:STDOUT: %T.loc4_17.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.2 (constants.%T)]
|
|
|
|
|
+// CHECK:STDOUT: %T.patt.loc4_17.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %Base: type = class_type @Base, @Base(%T.loc4_17.2) [symbolic = %Base (constants.%Base.2)]
|
|
|
|
|
+// CHECK:STDOUT: %.loc5_8.2: type = unbound_element_type @Base.%Base (%Base.2), @Base.%T.loc4_17.2 (%T) [symbolic = %.loc5_8.2 (constants.%.1)]
|
|
|
|
|
+// CHECK:STDOUT: %.loc6_1.2: type = struct_type {.x: @Base.%T.loc4_17.2 (%T)} [symbolic = %.loc6_1.2 (constants.%.2)]
|
|
|
|
|
+// CHECK:STDOUT: %.loc6_1.3: <witness> = complete_type_witness @Base.%.loc6_1.2 (%.2) [symbolic = %.loc6_1.3 (constants.%.3)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: class {
|
|
|
|
|
+// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_17.1 [symbolic = %T.loc4_17.2 (constants.%T)]
|
|
|
|
|
+// CHECK:STDOUT: %.loc5_8.1: @Base.%.loc5_8.2 (%.1) = field_decl x, element0 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.loc6_1.1: <witness> = complete_type_witness %.2 [symbolic = %.loc6_1.3 (constants.%.3)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
|
|
+// CHECK:STDOUT: .Self = constants.%Base.2
|
|
|
|
|
+// CHECK:STDOUT: .x = %.loc5_8.1
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: class @Param {
|
|
|
|
|
+// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %.loc9_10.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %.loc9_10.2: type = converted %int.make_type_32, %.loc9_10.1 [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %.loc9_8: %.4 = field_decl y, element0 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.loc10: <witness> = complete_type_witness %.5 [template = constants.%.6]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
|
|
+// CHECK:STDOUT: .Self = constants.%Param
|
|
|
|
|
+// CHECK:STDOUT: .y = %.loc9_8
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: class @Derived {
|
|
|
|
|
+// CHECK:STDOUT: %Base.ref: %Base.type = name_ref Base, file.%Base.decl [template = constants.%Base.1]
|
|
|
|
|
+// CHECK:STDOUT: %Param.ref: type = name_ref Param, file.%Param.decl [template = constants.%Param]
|
|
|
|
|
+// CHECK:STDOUT: %Base: type = class_type @Base, @Base(constants.%Param) [template = constants.%Base.3]
|
|
|
|
|
+// CHECK:STDOUT: %.loc13: %.13 = base_decl %Base.3, element0 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.loc14: <witness> = complete_type_witness %.14 [template = constants.%.15]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
|
|
+// CHECK:STDOUT: .Self = constants.%Derived
|
|
|
|
|
+// CHECK:STDOUT: .base = %.loc13
|
|
|
|
|
+// CHECK:STDOUT: extend %Base
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: fn @DoubleFieldAccess(%d.param_patt: %Derived) -> i32 {
|
|
|
|
|
+// CHECK:STDOUT: !entry:
|
|
|
|
|
+// CHECK:STDOUT: %d.ref: %Derived = name_ref d, %d
|
|
|
|
|
+// CHECK:STDOUT: %x.ref: %.7 = name_ref x, @Base.%.loc5_8.1 [template = @Base.%.loc5_8.1]
|
|
|
|
|
+// CHECK:STDOUT: %.loc17_11.1: ref %Base.3 = class_element_access %d.ref, element0
|
|
|
|
|
+// CHECK:STDOUT: %.loc17_11.2: ref %Base.3 = converted %d.ref, %.loc17_11.1
|
|
|
|
|
+// CHECK:STDOUT: %.loc17_11.3: ref %Param = class_element_access %.loc17_11.2, element0
|
|
|
|
|
+// CHECK:STDOUT: %y.ref: %.4 = name_ref y, @Param.%.loc9_8 [template = @Param.%.loc9_8]
|
|
|
|
|
+// CHECK:STDOUT: %.loc17_13.1: ref i32 = class_element_access %.loc17_11.3, element0
|
|
|
|
|
+// CHECK:STDOUT: %.loc17_13.2: i32 = bind_value %.loc17_13.1
|
|
|
|
|
+// CHECK:STDOUT: return %.loc17_13.2
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @Base(constants.%T) {
|
|
|
|
|
+// CHECK:STDOUT: %T.loc4_17.2 => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: %T.patt.loc4_17.2 => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @Base(@Base.%T.loc4_17.2) {
|
|
|
|
|
+// CHECK:STDOUT: %T.loc4_17.2 => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: %T.patt.loc4_17.2 => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @Base(constants.%Param) {
|
|
|
|
|
+// CHECK:STDOUT: %T.loc4_17.2 => constants.%Param
|
|
|
|
|
+// CHECK:STDOUT: %T.patt.loc4_17.2 => constants.%Param
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %Base => constants.%Base.3
|
|
|
|
|
+// CHECK:STDOUT: %.loc5_8.2 => constants.%.7
|
|
|
|
|
+// CHECK:STDOUT: %.loc6_1.2 => constants.%.8
|
|
|
|
|
+// CHECK:STDOUT: %.loc6_1.3 => constants.%.9
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: --- import.carbon
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: constants {
|
|
|
|
|
+// CHECK:STDOUT: %Derived: type = class_type @Derived [template]
|
|
|
|
|
+// CHECK:STDOUT: %Param: type = class_type @Param [template]
|
|
|
|
|
+// CHECK:STDOUT: %.1: type = struct_type {.y: i32} [template]
|
|
|
|
|
+// CHECK:STDOUT: %.2: <witness> = complete_type_witness %.1 [template]
|
|
|
|
|
+// CHECK:STDOUT: %Base.type: type = generic_class_type @Base [template]
|
|
|
|
|
+// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
|
|
|
|
+// CHECK:STDOUT: %Base.1: %Base.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.3: type = struct_type {.x: %T} [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.4: <witness> = complete_type_witness %.3 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %Base.2: type = class_type @Base, @Base(%T) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %Base.3: type = class_type @Base, @Base(%Param) [template]
|
|
|
|
|
+// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, %Base.3 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.6: type = struct_type {.base: %Base.3} [template]
|
|
|
|
|
+// CHECK:STDOUT: %.7: <witness> = complete_type_witness %.6 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.8: type = unbound_element_type %Base.2, %T [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.9: type = unbound_element_type %Base.3, %Param [template]
|
|
|
|
|
+// CHECK:STDOUT: %.10: type = struct_type {.x: %Param} [template]
|
|
|
|
|
+// CHECK:STDOUT: %.11: <witness> = complete_type_witness %.10 [template]
|
|
|
|
|
+// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
|
|
|
|
+// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %ImportedDoubleFieldAccess.type: type = fn_type @ImportedDoubleFieldAccess [template]
|
|
|
|
|
+// CHECK:STDOUT: %ImportedDoubleFieldAccess: %ImportedDoubleFieldAccess.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %.12: type = ptr_type %.3 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.13: type = struct_type {.base: %.12} [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.14: type = ptr_type %.6 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.15: type = ptr_type %.1 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.16: type = unbound_element_type %Param, i32 [template]
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: imports {
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.1 = import_ref Main//extend_generic_base, inst+9, unloaded
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.2 = import_ref Main//extend_generic_base, inst+26, unloaded
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.3: type = import_ref Main//extend_generic_base, inst+43, loaded [template = constants.%Derived]
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.4 = import_ref Main//extend_generic_base, inst+72, unloaded
|
|
|
|
|
+// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
|
|
|
+// CHECK:STDOUT: .Int32 = %import_ref.11
|
|
|
|
|
+// CHECK:STDOUT: import Core//prelude
|
|
|
|
|
+// CHECK:STDOUT: import Core//prelude/...
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.5 = import_ref Main//extend_generic_base, inst+27, unloaded
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.6: %.16 = import_ref Main//extend_generic_base, inst+39, loaded [template = %.1]
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.7 = import_ref Main//extend_generic_base, inst+15, unloaded
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.8: @Base.%.1 (%.8) = import_ref Main//extend_generic_base, inst+18, loaded [template = %.2]
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.9 = import_ref Main//extend_generic_base, inst+44, unloaded
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.10 = import_ref Main//extend_generic_base, inst+56, unloaded
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32]
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: file {
|
|
|
|
|
+// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
|
|
+// CHECK:STDOUT: .Base = imports.%import_ref.1
|
|
|
|
|
+// CHECK:STDOUT: .Param = imports.%import_ref.2
|
|
|
|
|
+// CHECK:STDOUT: .Derived = imports.%import_ref.3
|
|
|
|
|
+// CHECK:STDOUT: .DoubleFieldAccess = imports.%import_ref.4
|
|
|
|
|
+// CHECK:STDOUT: .Core = imports.%Core
|
|
|
|
|
+// CHECK:STDOUT: .ImportedDoubleFieldAccess = %ImportedDoubleFieldAccess.decl
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: %Core.import = import Core
|
|
|
|
|
+// CHECK:STDOUT: %default.import = import <invalid>
|
|
|
|
|
+// CHECK:STDOUT: %ImportedDoubleFieldAccess.decl: %ImportedDoubleFieldAccess.type = fn_decl @ImportedDoubleFieldAccess [template = constants.%ImportedDoubleFieldAccess] {
|
|
|
|
|
+// CHECK:STDOUT: %d.patt: %Derived = binding_pattern d
|
|
|
|
|
+// CHECK:STDOUT: %d.param_patt: %Derived = value_param_pattern %d.patt, runtime_param0
|
|
|
|
|
+// CHECK:STDOUT: %return.patt: i32 = return_slot_pattern
|
|
|
|
|
+// CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1
|
|
|
|
|
+// CHECK:STDOUT: } {
|
|
|
|
|
+// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, imports.%import_ref.3 [template = constants.%Derived]
|
|
|
|
|
+// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %.loc6_45.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %.loc6_45.2: type = converted %int.make_type_32, %.loc6_45.1 [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %d.param: %Derived = value_param runtime_param0
|
|
|
|
|
+// CHECK:STDOUT: %d: %Derived = bind_name d, %d.param
|
|
|
|
|
+// CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1
|
|
|
|
|
+// CHECK:STDOUT: %return: ref i32 = return_slot %return.param
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: class @Derived {
|
|
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
|
|
+// CHECK:STDOUT: .Self = imports.%import_ref.9
|
|
|
|
|
+// CHECK:STDOUT: .base = imports.%import_ref.10
|
|
|
|
|
+// CHECK:STDOUT: extend constants.%Base.3
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: class @Param {
|
|
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
|
|
+// CHECK:STDOUT: .Self = imports.%import_ref.5
|
|
|
|
|
+// CHECK:STDOUT: .y = imports.%import_ref.6
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: generic class @Base(constants.%T: type) {
|
|
|
|
|
+// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
|
|
|
|
|
+// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %Base: type = class_type @Base, @Base(%T) [symbolic = %Base (constants.%Base.2)]
|
|
|
|
|
+// CHECK:STDOUT: %.1: type = unbound_element_type @Base.%Base (%Base.2), @Base.%T (%T) [symbolic = %.1 (constants.%.8)]
|
|
|
|
|
+// CHECK:STDOUT: %.2: type = struct_type {.x: @Base.%T (%T)} [symbolic = %.2 (constants.%.3)]
|
|
|
|
|
+// CHECK:STDOUT: %.3: <witness> = complete_type_witness @Base.%.2 (%.3) [symbolic = %.3 (constants.%.4)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: class {
|
|
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
|
|
+// CHECK:STDOUT: .Self = imports.%import_ref.7
|
|
|
|
|
+// CHECK:STDOUT: .x = imports.%import_ref.8
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: fn @ImportedDoubleFieldAccess(%d.param_patt: %Derived) -> i32 {
|
|
|
|
|
+// CHECK:STDOUT: !entry:
|
|
|
|
|
+// CHECK:STDOUT: %d.ref: %Derived = name_ref d, %d
|
|
|
|
|
+// CHECK:STDOUT: %x.ref: %.9 = name_ref x, imports.%import_ref.8 [template = imports.%.2]
|
|
|
|
|
+// CHECK:STDOUT: %.loc7_11.1: ref %Base.3 = class_element_access %d.ref, element0
|
|
|
|
|
+// CHECK:STDOUT: %.loc7_11.2: ref %Base.3 = converted %d.ref, %.loc7_11.1
|
|
|
|
|
+// CHECK:STDOUT: %.loc7_11.3: ref %Param = class_element_access %.loc7_11.2, element0
|
|
|
|
|
+// CHECK:STDOUT: %y.ref: %.16 = name_ref y, imports.%import_ref.6 [template = imports.%.1]
|
|
|
|
|
+// CHECK:STDOUT: %.loc7_13.1: ref i32 = class_element_access %.loc7_11.3, element0
|
|
|
|
|
+// CHECK:STDOUT: %.loc7_13.2: i32 = bind_value %.loc7_13.1
|
|
|
|
|
+// CHECK:STDOUT: return %.loc7_13.2
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @Base(constants.%T) {
|
|
|
|
|
+// CHECK:STDOUT: %T => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: %T.patt => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @Base(constants.%Param) {
|
|
|
|
|
+// CHECK:STDOUT: %T => constants.%Param
|
|
|
|
|
+// CHECK:STDOUT: %T.patt => constants.%Param
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %Base => constants.%Base.3
|
|
|
|
|
+// CHECK:STDOUT: %.1 => constants.%.9
|
|
|
|
|
+// CHECK:STDOUT: %.2 => constants.%.10
|
|
|
|
|
+// CHECK:STDOUT: %.3 => constants.%.11
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @Base(@Base.%T) {
|
|
|
|
|
+// CHECK:STDOUT: %T => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: %T.patt => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: --- fail_todo_extend_symbolic_base.carbon
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: constants {
|
|
|
|
|
+// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %C.type: type = generic_class_type @C [template]
|
|
|
|
|
+// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
|
|
|
|
+// CHECK:STDOUT: %C.1: %C.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %X: type = class_type @X [template]
|
|
|
|
|
+// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
|
|
|
|
+// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %.1: type = struct_type {} [template]
|
|
|
|
|
+// CHECK:STDOUT: %.2: <witness> = complete_type_witness %.1 [template]
|
|
|
|
|
+// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
|
|
|
|
+// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %C.3: type = class_type @C, @C(%X) [template]
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: imports {
|
|
|
|
|
+// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
|
|
|
+// CHECK:STDOUT: import Core//prelude
|
|
|
|
|
+// CHECK:STDOUT: import Core//prelude/...
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: file {
|
|
|
|
|
+// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
|
|
+// CHECK:STDOUT: .Core = imports.%Core
|
|
|
|
|
+// CHECK:STDOUT: .C = %C.decl
|
|
|
|
|
+// CHECK:STDOUT: .X = %X.decl
|
|
|
|
|
+// CHECK:STDOUT: .F = %F.decl
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: %Core.import = import Core
|
|
|
|
|
+// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] {
|
|
|
|
|
+// CHECK:STDOUT: %T.patt.loc4_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)]
|
|
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_9.1, runtime_param<invalid> [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)]
|
|
|
|
|
+// CHECK:STDOUT: } {
|
|
|
|
|
+// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
|
|
+// CHECK:STDOUT: %T.loc4_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_9.2 (constants.%T)]
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} {}
|
|
|
|
|
+// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {}
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: generic class @C(%T.loc4_9.1: type) {
|
|
|
|
|
+// CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.2 (constants.%T)]
|
|
|
|
|
+// CHECK:STDOUT: %T.patt.loc4_9.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: class {
|
|
|
|
|
+// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_9.1 [symbolic = %T.loc4_9.2 (constants.%T)]
|
|
|
|
|
+// CHECK:STDOUT: %.loc9: <error> = base_decl <error>, element0 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.loc10: <witness> = complete_type_witness <error> [template = <error>]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
|
|
+// CHECK:STDOUT: .Self = constants.%C.2
|
|
|
|
|
+// CHECK:STDOUT: .base = %.loc9
|
|
|
|
|
+// CHECK:STDOUT: has_error
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: class @X {
|
|
|
|
|
+// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {}
|
|
|
|
|
+// CHECK:STDOUT: %.loc14: <witness> = complete_type_witness %.1 [template = constants.%.2]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
|
|
+// CHECK:STDOUT: .Self = constants.%X
|
|
|
|
|
+// CHECK:STDOUT: .G = %G.decl
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: fn @G() {
|
|
|
|
|
+// CHECK:STDOUT: !entry:
|
|
|
|
|
+// CHECK:STDOUT: return
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: fn @F() {
|
|
|
|
|
+// CHECK:STDOUT: !entry:
|
|
|
|
|
+// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1]
|
|
|
|
|
+// CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X]
|
|
|
|
|
+// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%X) [template = constants.%C.3]
|
|
|
|
|
+// CHECK:STDOUT: %G.ref: <error> = name_ref G, <error> [template = <error>]
|
|
|
|
|
+// CHECK:STDOUT: return
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @C(constants.%T) {
|
|
|
|
|
+// CHECK:STDOUT: %T.loc4_9.2 => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: %T.patt.loc4_9.2 => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @C(constants.%X) {
|
|
|
|
|
+// CHECK:STDOUT: %T.loc4_9.2 => constants.%X
|
|
|
|
|
+// CHECK:STDOUT: %T.patt.loc4_9.2 => constants.%X
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: --- extend_generic_symbolic_base.carbon
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: constants {
|
|
|
|
|
+// CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %X.type: type = generic_class_type @X [template]
|
|
|
|
|
+// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
|
|
|
|
+// CHECK:STDOUT: %X.1: %X.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %X.2: type = class_type @X, @X(%U) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %G.type.1: type = fn_type @G, @X(%U) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.1: type = struct_type {} [template]
|
|
|
|
|
+// CHECK:STDOUT: %.2: <witness> = complete_type_witness %.1 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.3: <specific function> = specific_function %G.1, @G(%U) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %C.type: type = generic_class_type @C [template]
|
|
|
|
|
+// CHECK:STDOUT: %C.1: %C.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %X.3: type = class_type @X, @X(%T) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %G.type.2: type = fn_type @G, @X(%T) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.4: type = ptr_type %.1 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.5: type = unbound_element_type %C.2, %X.3 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.6: type = struct_type {.base: %X.3} [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.7: <witness> = complete_type_witness %.6 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
|
|
|
|
+// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
|
|
|
|
+// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %C.3: type = class_type @C, @C(i32) [template]
|
|
|
|
|
+// CHECK:STDOUT: %X.4: type = class_type @X, @X(i32) [template]
|
|
|
|
|
+// CHECK:STDOUT: %.8: type = unbound_element_type %C.3, %X.4 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.9: type = struct_type {.base: %X.4} [template]
|
|
|
|
|
+// CHECK:STDOUT: %.10: <witness> = complete_type_witness %.9 [template]
|
|
|
|
|
+// CHECK:STDOUT: %G.type.3: type = fn_type @G, @X(i32) [template]
|
|
|
|
|
+// CHECK:STDOUT: %G.3: %G.type.3 = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %.11: type = struct_type {.base: %.4} [template]
|
|
|
|
|
+// CHECK:STDOUT: %.12: type = ptr_type %.9 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.13: <specific function> = specific_function %G.3, @G(i32) [template]
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: imports {
|
|
|
|
|
+// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
|
|
|
+// CHECK:STDOUT: .Int32 = %import_ref
|
|
|
|
|
+// CHECK:STDOUT: import Core//prelude
|
|
|
|
|
+// CHECK:STDOUT: import Core//prelude/...
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32]
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: file {
|
|
|
|
|
+// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
|
|
+// CHECK:STDOUT: .Core = imports.%Core
|
|
|
|
|
+// CHECK:STDOUT: .X = %X.decl
|
|
|
|
|
+// CHECK:STDOUT: .C = %C.decl
|
|
|
|
|
+// CHECK:STDOUT: .F = %F.decl
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: %Core.import = import Core
|
|
|
|
|
+// CHECK:STDOUT: %X.decl: %X.type = class_decl @X [template = constants.%X.1] {
|
|
|
|
|
+// CHECK:STDOUT: %U.patt.loc4_14.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc4_14.2 (constants.%U.patt)]
|
|
|
|
|
+// CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc4_14.1, runtime_param<invalid> [symbolic = %U.patt.loc4_14.2 (constants.%U.patt)]
|
|
|
|
|
+// CHECK:STDOUT: } {
|
|
|
|
|
+// CHECK:STDOUT: %U.param: type = value_param runtime_param<invalid>
|
|
|
|
|
+// CHECK:STDOUT: %U.loc4_14.1: type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc4_14.2 (constants.%U)]
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] {
|
|
|
|
|
+// CHECK:STDOUT: %T.patt.loc8_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)]
|
|
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_9.1, runtime_param<invalid> [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)]
|
|
|
|
|
+// CHECK:STDOUT: } {
|
|
|
|
|
+// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
|
|
+// CHECK:STDOUT: %T.loc8_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_9.2 (constants.%T)]
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {}
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: generic class @X(%U.loc4_14.1: type) {
|
|
|
|
|
+// CHECK:STDOUT: %U.loc4_14.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc4_14.2 (constants.%U)]
|
|
|
|
|
+// CHECK:STDOUT: %U.patt.loc4_14.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc4_14.2 (constants.%U.patt)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %G.type: type = fn_type @G, @X(%U.loc4_14.2) [symbolic = %G.type (constants.%G.type.1)]
|
|
|
|
|
+// CHECK:STDOUT: %G: @X.%G.type (%G.type.1) = struct_value () [symbolic = %G (constants.%G.1)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: class {
|
|
|
|
|
+// CHECK:STDOUT: %G.decl: @X.%G.type (%G.type.1) = fn_decl @G [symbolic = @X.%G (constants.%G.1)] {
|
|
|
|
|
+// CHECK:STDOUT: %return.patt: @G.%U (%U) = return_slot_pattern
|
|
|
|
|
+// CHECK:STDOUT: %return.param_patt: @G.%U (%U) = out_param_pattern %return.patt, runtime_param0
|
|
|
|
|
+// CHECK:STDOUT: } {
|
|
|
|
|
+// CHECK:STDOUT: %U.ref: type = name_ref U, @X.%U.loc4_14.1 [symbolic = %U (constants.%U)]
|
|
|
|
|
+// CHECK:STDOUT: %return.param: ref @G.%U (%U) = out_param runtime_param0
|
|
|
|
|
+// CHECK:STDOUT: %return: ref @G.%U (%U) = return_slot %return.param
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: %.loc6: <witness> = complete_type_witness %.1 [template = constants.%.2]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
|
|
+// CHECK:STDOUT: .Self = constants.%X.2
|
|
|
|
|
+// CHECK:STDOUT: .G = %G.decl
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: generic class @C(%T.loc8_9.1: type) {
|
|
|
|
|
+// CHECK:STDOUT: %T.loc8_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_9.2 (constants.%T)]
|
|
|
|
|
+// CHECK:STDOUT: %T.patt.loc8_9.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %X.loc9_17.2: type = class_type @X, @X(%T.loc8_9.2) [symbolic = %X.loc9_17.2 (constants.%X.3)]
|
|
|
|
|
+// CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc8_9.2) [symbolic = %C (constants.%C.2)]
|
|
|
|
|
+// CHECK:STDOUT: %.loc9_20.2: type = unbound_element_type @C.%C (%C.2), @C.%X.loc9_17.2 (%X.3) [symbolic = %.loc9_20.2 (constants.%.5)]
|
|
|
|
|
+// CHECK:STDOUT: %.loc10_1.2: type = struct_type {.base: @C.%X.loc9_17.2 (%X.3)} [symbolic = %.loc10_1.2 (constants.%.6)]
|
|
|
|
|
+// CHECK:STDOUT: %.loc10_1.3: <witness> = complete_type_witness @C.%.loc10_1.2 (%.6) [symbolic = %.loc10_1.3 (constants.%.7)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: class {
|
|
|
|
|
+// CHECK:STDOUT: %X.ref: %X.type = name_ref X, file.%X.decl [template = constants.%X.1]
|
|
|
|
|
+// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_9.1 [symbolic = %T.loc8_9.2 (constants.%T)]
|
|
|
|
|
+// CHECK:STDOUT: %X.loc9_17.1: type = class_type @X, @X(constants.%T) [symbolic = %X.loc9_17.2 (constants.%X.3)]
|
|
|
|
|
+// CHECK:STDOUT: %.loc9_20.1: @C.%.loc9_20.2 (%.5) = base_decl %X.3, element0 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.loc10_1.1: <witness> = complete_type_witness %.6 [symbolic = %.loc10_1.3 (constants.%.7)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
|
|
+// CHECK:STDOUT: .Self = constants.%C.2
|
|
|
|
|
+// CHECK:STDOUT: .base = %.loc9_20.1
|
|
|
|
|
+// CHECK:STDOUT: extend %X.loc9_17.1
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: generic fn @G(@X.%U.loc4_14.1: type) {
|
|
|
|
|
+// CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %G.type: type = fn_type @G, @X(%U) [symbolic = %G.type (constants.%G.type.1)]
|
|
|
|
|
+// CHECK:STDOUT: %G: @G.%G.type (%G.type.1) = struct_value () [symbolic = %G (constants.%G.1)]
|
|
|
|
|
+// CHECK:STDOUT: %.loc5_24.3: <specific function> = specific_function %G, @G(%U) [symbolic = %.loc5_24.3 (constants.%.3)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: fn() -> @G.%U (%U) {
|
|
|
|
|
+// CHECK:STDOUT: !entry:
|
|
|
|
|
+// CHECK:STDOUT: %.loc5_24.1: @G.%G.type (%G.type.1) = specific_constant @X.%G.decl, @X(constants.%U) [symbolic = %G (constants.%G.1)]
|
|
|
|
|
+// CHECK:STDOUT: %G.ref: @G.%G.type (%G.type.1) = name_ref G, %.loc5_24.1 [symbolic = %G (constants.%G.1)]
|
|
|
|
|
+// CHECK:STDOUT: %.loc5_24.2: <specific function> = specific_function %G.ref, @G(constants.%U) [symbolic = %.loc5_24.3 (constants.%.3)]
|
|
|
|
|
+// CHECK:STDOUT: %G.call: init @G.%U (%U) = call %.loc5_24.2()
|
|
|
|
|
+// CHECK:STDOUT: %.loc5_27.1: @G.%U (%U) = value_of_initializer %G.call
|
|
|
|
|
+// CHECK:STDOUT: %.loc5_27.2: @G.%U (%U) = converted %G.call, %.loc5_27.1
|
|
|
|
|
+// CHECK:STDOUT: return %.loc5_27.2
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: fn @F() {
|
|
|
|
|
+// CHECK:STDOUT: !entry:
|
|
|
|
|
+// CHECK:STDOUT: %int.make_type_32.loc13_10: init type = call constants.%Int32() [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13_10 [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13_10, %.loc13_10.1 [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1]
|
|
|
|
|
+// CHECK:STDOUT: %int.make_type_32.loc13_18: init type = call constants.%Int32() [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_17.1: type = value_of_initializer %int.make_type_32.loc13_18 [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_32.loc13_18, %.loc13_17.1 [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %C: type = class_type @C, @C(i32) [template = constants.%C.3]
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_22.1: %G.type.3 = specific_constant @X.%G.decl, @X(i32) [template = constants.%G.3]
|
|
|
|
|
+// CHECK:STDOUT: %G.ref: %G.type.3 = name_ref G, %.loc13_22.1 [template = constants.%G.3]
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_22.2: <specific function> = specific_function %G.ref, @G(i32) [template = constants.%.13]
|
|
|
|
|
+// CHECK:STDOUT: %G.call: init i32 = call %.loc13_22.2()
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_26.1: i32 = value_of_initializer %G.call
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_26.2: i32 = converted %G.call, %.loc13_26.1
|
|
|
|
|
+// CHECK:STDOUT: %i: i32 = bind_name i, %.loc13_26.2
|
|
|
|
|
+// CHECK:STDOUT: return
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @X(constants.%U) {
|
|
|
|
|
+// CHECK:STDOUT: %U.loc4_14.2 => constants.%U
|
|
|
|
|
+// CHECK:STDOUT: %U.patt.loc4_14.2 => constants.%U
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %G.type => constants.%G.type.1
|
|
|
|
|
+// CHECK:STDOUT: %G => constants.%G.1
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @G(constants.%U) {
|
|
|
|
|
+// CHECK:STDOUT: %U => constants.%U
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %G.type => constants.%G.type.1
|
|
|
|
|
+// CHECK:STDOUT: %G => constants.%G.1
|
|
|
|
|
+// CHECK:STDOUT: %.loc5_24.3 => constants.%.3
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @X(@X.%U.loc4_14.2) {
|
|
|
|
|
+// CHECK:STDOUT: %U.loc4_14.2 => constants.%U
|
|
|
|
|
+// CHECK:STDOUT: %U.patt.loc4_14.2 => constants.%U
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @X(@G.%U) {
|
|
|
|
|
+// CHECK:STDOUT: %U.loc4_14.2 => constants.%U
|
|
|
|
|
+// CHECK:STDOUT: %U.patt.loc4_14.2 => constants.%U
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @G(@G.%U) {
|
|
|
|
|
+// CHECK:STDOUT: %U => constants.%U
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @C(constants.%T) {
|
|
|
|
|
+// CHECK:STDOUT: %T.loc8_9.2 => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: %T.patt.loc8_9.2 => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @X(constants.%T) {
|
|
|
|
|
+// CHECK:STDOUT: %U.loc4_14.2 => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: %U.patt.loc4_14.2 => constants.%T
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %G.type => constants.%G.type.2
|
|
|
|
|
+// CHECK:STDOUT: %G => constants.%G.2
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @X(@C.%T.loc8_9.2) {
|
|
|
|
|
+// CHECK:STDOUT: %U.loc4_14.2 => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: %U.patt.loc4_14.2 => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @C(@C.%T.loc8_9.2) {
|
|
|
|
|
+// CHECK:STDOUT: %T.loc8_9.2 => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: %T.patt.loc8_9.2 => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @C(i32) {
|
|
|
|
|
+// CHECK:STDOUT: %T.loc8_9.2 => i32
|
|
|
|
|
+// CHECK:STDOUT: %T.patt.loc8_9.2 => i32
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %X.loc9_17.2 => constants.%X.4
|
|
|
|
|
+// CHECK:STDOUT: %C => constants.%C.3
|
|
|
|
|
+// CHECK:STDOUT: %.loc9_20.2 => constants.%.8
|
|
|
|
|
+// CHECK:STDOUT: %.loc10_1.2 => constants.%.9
|
|
|
|
|
+// CHECK:STDOUT: %.loc10_1.3 => constants.%.10
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @X(i32) {
|
|
|
|
|
+// CHECK:STDOUT: %U.loc4_14.2 => i32
|
|
|
|
|
+// CHECK:STDOUT: %U.patt.loc4_14.2 => i32
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %G.type => constants.%G.type.3
|
|
|
|
|
+// CHECK:STDOUT: %G => constants.%G.3
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @G(i32) {
|
|
|
|
|
+// CHECK:STDOUT: %U => i32
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %G.type => constants.%G.type.3
|
|
|
|
|
+// CHECK:STDOUT: %G => constants.%G.3
|
|
|
|
|
+// CHECK:STDOUT: %.loc5_24.3 => constants.%.13
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: --- fail_todo_import_extend_generic_symbolic_base.carbon
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: constants {
|
|
|
|
|
+// CHECK:STDOUT: %H.type: type = fn_type @H [template]
|
|
|
|
|
+// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
|
|
|
|
+// CHECK:STDOUT: %H: %H.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
|
|
|
|
+// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %C.type: type = generic_class_type @C [template]
|
|
|
|
|
+// CHECK:STDOUT: %C.1: %C.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %X.type: type = generic_class_type @X [template]
|
|
|
|
|
+// CHECK:STDOUT: %X.1: %X.type = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %.1: type = struct_type {} [template]
|
|
|
|
|
+// CHECK:STDOUT: %.2: <witness> = complete_type_witness %.1 [template]
|
|
|
|
|
+// CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %X.2: type = class_type @X, @X(%U) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %X.3: type = class_type @X, @X(%T) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.3: type = unbound_element_type %C.2, %X.3 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.4: type = struct_type {.base: %X.3} [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.5: <witness> = complete_type_witness %.4 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %G.type.1: type = fn_type @G, @X(%U) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.6: <specific function> = specific_function %G.1, @G(%U) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %G.type.2: type = fn_type @G, @X(%T) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %C.3: type = class_type @C, @C(i32) [template]
|
|
|
|
|
+// CHECK:STDOUT: %X.4: type = class_type @X, @X(i32) [template]
|
|
|
|
|
+// CHECK:STDOUT: %.7: type = unbound_element_type %C.3, %X.4 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.8: type = struct_type {.base: %X.4} [template]
|
|
|
|
|
+// CHECK:STDOUT: %.9: <witness> = complete_type_witness %.8 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.10: type = ptr_type %.1 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.11: type = struct_type {.base: %.10} [template]
|
|
|
|
|
+// CHECK:STDOUT: %.12: type = ptr_type %.4 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.13: <specific function> = specific_function %G.2, @G(%T) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template]
|
|
|
|
|
+// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.14: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.13 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(i32)> [template]
|
|
|
|
|
+// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(i32) [template]
|
|
|
|
|
+// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template]
|
|
|
|
|
+// CHECK:STDOUT: %.16: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.17: %.16 = assoc_entity element0, imports.%import_ref.13 [template]
|
|
|
|
|
+// CHECK:STDOUT: %.18: %.14 = assoc_entity element0, imports.%import_ref.14 [symbolic]
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: imports {
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.1 = import_ref Main//extend_generic_symbolic_base, inst+9, unloaded
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.2: %C.type = import_ref Main//extend_generic_symbolic_base, inst+47, loaded [template = constants.%C.1]
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.3 = import_ref Main//extend_generic_symbolic_base, inst+70, unloaded
|
|
|
|
|
+// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
|
|
|
+// CHECK:STDOUT: .Int32 = %import_ref.4
|
|
|
|
|
+// CHECK:STDOUT: .ImplicitAs = %import_ref.9
|
|
|
|
|
+// CHECK:STDOUT: import Core//prelude
|
|
|
|
|
+// CHECK:STDOUT: import Core//prelude/...
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32]
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.5 = import_ref Main//extend_generic_symbolic_base, inst+15, unloaded
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.6: @X.%G.type (%G.type.1) = import_ref Main//extend_generic_symbolic_base, inst+21, loaded [symbolic = @X.%G (constants.%G.1)]
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.7 = import_ref Main//extend_generic_symbolic_base, inst+52, unloaded
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.8 = import_ref Main//extend_generic_symbolic_base, inst+61, unloaded
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.9: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+48, loaded [template = constants.%ImplicitAs]
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/as, inst+54, unloaded
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.11: @ImplicitAs.%.1 (%.14) = import_ref Core//prelude/operators/as, inst+76, loaded [symbolic = @ImplicitAs.%.2 (constants.%.18)]
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.12 = import_ref Core//prelude/operators/as, inst+69, unloaded
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.13 = import_ref Core//prelude/operators/as, inst+69, unloaded
|
|
|
|
|
+// CHECK:STDOUT: %import_ref.14 = import_ref Core//prelude/operators/as, inst+69, unloaded
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: file {
|
|
|
|
|
+// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
|
|
+// CHECK:STDOUT: .X = imports.%import_ref.1
|
|
|
|
|
+// CHECK:STDOUT: .C = imports.%import_ref.2
|
|
|
|
|
+// CHECK:STDOUT: .F = imports.%import_ref.3
|
|
|
|
|
+// CHECK:STDOUT: .Core = imports.%Core
|
|
|
|
|
+// CHECK:STDOUT: .H = %H.decl
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: %Core.import = import Core
|
|
|
|
|
+// CHECK:STDOUT: %default.import = import <invalid>
|
|
|
|
|
+// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} {}
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
|
|
|
|
|
+// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
|
|
|
+// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
|
|
|
|
+// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
|
|
|
|
+// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
|
|
|
|
|
+// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
|
|
|
|
|
+// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.14)]
|
|
|
|
|
+// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.14) = assoc_entity element0, imports.%import_ref.13 [symbolic = %.2 (constants.%.15)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: interface {
|
|
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
|
|
+// CHECK:STDOUT: .Self = imports.%import_ref.10
|
|
|
|
|
+// CHECK:STDOUT: .Convert = imports.%import_ref.11
|
|
|
|
|
+// CHECK:STDOUT: witness = (imports.%import_ref.12)
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: generic class @C(constants.%T: type) {
|
|
|
|
|
+// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
|
|
|
|
|
+// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %X: type = class_type @X, @X(%T) [symbolic = %X (constants.%X.3)]
|
|
|
|
|
+// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.2)]
|
|
|
|
|
+// CHECK:STDOUT: %.1: type = unbound_element_type @C.%C (%C.2), @C.%X (%X.3) [symbolic = %.1 (constants.%.3)]
|
|
|
|
|
+// CHECK:STDOUT: %.2: type = struct_type {.base: @C.%X (%X.3)} [symbolic = %.2 (constants.%.4)]
|
|
|
|
|
+// CHECK:STDOUT: %.3: <witness> = complete_type_witness @C.%.2 (%.4) [symbolic = %.3 (constants.%.5)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: class {
|
|
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
|
|
+// CHECK:STDOUT: .Self = imports.%import_ref.7
|
|
|
|
|
+// CHECK:STDOUT: .base = imports.%import_ref.8
|
|
|
|
|
+// CHECK:STDOUT: extend constants.%X.3
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: generic class @X(constants.%U: type) {
|
|
|
|
|
+// CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)]
|
|
|
|
|
+// CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt (constants.%U.patt)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %G.type: type = fn_type @G, @X(%U) [symbolic = %G.type (constants.%G.type.1)]
|
|
|
|
|
+// CHECK:STDOUT: %G: @X.%G.type (%G.type.1) = struct_value () [symbolic = %G (constants.%G.1)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: class {
|
|
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
|
|
+// CHECK:STDOUT: .Self = imports.%import_ref.5
|
|
|
|
|
+// CHECK:STDOUT: .G = imports.%import_ref.6
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: fn @H() {
|
|
|
|
|
+// CHECK:STDOUT: !entry:
|
|
|
|
|
+// CHECK:STDOUT: %int.make_type_32.loc13_10: init type = call constants.%Int32() [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13_10 [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13_10, %.loc13_10.1 [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.2 [template = constants.%C.1]
|
|
|
|
|
+// CHECK:STDOUT: %int.make_type_32.loc13_18: init type = call constants.%Int32() [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_17.1: type = value_of_initializer %int.make_type_32.loc13_18 [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_32.loc13_18, %.loc13_17.1 [template = i32]
|
|
|
|
|
+// CHECK:STDOUT: %C: type = class_type @C, @C(i32) [template = constants.%C.3]
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_22.1: %G.type.2 = specific_constant imports.%import_ref.6, @X(constants.%T) [symbolic = constants.%G.2]
|
|
|
|
|
+// CHECK:STDOUT: %G.ref: %G.type.2 = name_ref G, %.loc13_22.1 [symbolic = constants.%G.2]
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_22.2: <specific function> = specific_function %G.ref, @G(constants.%T) [symbolic = constants.%.13]
|
|
|
|
|
+// CHECK:STDOUT: %G.call: init %T = call %.loc13_22.2()
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_26: i32 = converted %G.call, <error> [template = <error>]
|
|
|
|
|
+// CHECK:STDOUT: %j: i32 = bind_name j, <error>
|
|
|
|
|
+// CHECK:STDOUT: return
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: generic fn @G(constants.%U: type) {
|
|
|
|
|
+// CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %G.type: type = fn_type @G, @X(%U) [symbolic = %G.type (constants.%G.type.1)]
|
|
|
|
|
+// CHECK:STDOUT: %G: @G.%G.type (%G.type.1) = struct_value () [symbolic = %G (constants.%G.1)]
|
|
|
|
|
+// CHECK:STDOUT: %.1: <specific function> = specific_function %G, @G(%U) [symbolic = %.1 (constants.%.6)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: fn() -> @G.%U (%U);
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) {
|
|
|
|
|
+// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
|
|
|
|
+// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest);
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @X(constants.%U) {
|
|
|
|
|
+// CHECK:STDOUT: %U => constants.%U
|
|
|
|
|
+// CHECK:STDOUT: %U.patt => constants.%U
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %G.type => constants.%G.type.1
|
|
|
|
|
+// CHECK:STDOUT: %G => constants.%G.1
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @X(constants.%T) {
|
|
|
|
|
+// CHECK:STDOUT: %U => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: %U.patt => constants.%T
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %G.type => constants.%G.type.2
|
|
|
|
|
+// CHECK:STDOUT: %G => constants.%G.2
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @C(constants.%T) {
|
|
|
|
|
+// CHECK:STDOUT: %T => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: %T.patt => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @X(@X.%U) {
|
|
|
|
|
+// CHECK:STDOUT: %U => constants.%U
|
|
|
|
|
+// CHECK:STDOUT: %U.patt => constants.%U
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @X(@C.%T) {
|
|
|
|
|
+// CHECK:STDOUT: %U => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: %U.patt => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @C(@C.%T) {
|
|
|
|
|
+// CHECK:STDOUT: %T => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: %T.patt => constants.%T
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @G(constants.%U) {
|
|
|
|
|
+// CHECK:STDOUT: %U => constants.%U
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %G.type => constants.%G.type.1
|
|
|
|
|
+// CHECK:STDOUT: %G => constants.%G.1
|
|
|
|
|
+// CHECK:STDOUT: %.1 => constants.%.6
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @X(@G.%U) {
|
|
|
|
|
+// CHECK:STDOUT: %U => constants.%U
|
|
|
|
|
+// CHECK:STDOUT: %U.patt => constants.%U
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @G(@G.%U) {
|
|
|
|
|
+// CHECK:STDOUT: %U => constants.%U
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @C(i32) {
|
|
|
|
|
+// CHECK:STDOUT: %T => i32
|
|
|
|
|
+// CHECK:STDOUT: %T.patt => i32
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %X => constants.%X.4
|
|
|
|
|
+// CHECK:STDOUT: %C => constants.%C.3
|
|
|
|
|
+// CHECK:STDOUT: %.1 => constants.%.7
|
|
|
|
|
+// CHECK:STDOUT: %.2 => constants.%.8
|
|
|
|
|
+// CHECK:STDOUT: %.3 => constants.%.9
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @X(i32) {
|
|
|
|
|
+// CHECK:STDOUT: %U => i32
|
|
|
|
|
+// CHECK:STDOUT: %U.patt => i32
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @G(constants.%T) {
|
|
|
|
|
+// CHECK:STDOUT: %U => constants.%T
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %G.type => constants.%G.type.2
|
|
|
|
|
+// CHECK:STDOUT: %G => constants.%G.2
|
|
|
|
|
+// CHECK:STDOUT: %.1 => constants.%.13
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
|
|
|
|
|
+// CHECK:STDOUT: %Dest => constants.%Dest
|
|
|
|
|
+// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @ImplicitAs(@ImplicitAs.%Dest) {
|
|
|
|
|
+// CHECK:STDOUT: %Dest => constants.%Dest
|
|
|
|
|
+// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {
|
|
|
|
|
+// CHECK:STDOUT: %Dest => constants.%Dest
|
|
|
|
|
+// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) {
|
|
|
|
|
+// CHECK:STDOUT: %Dest => constants.%Dest
|
|
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2
|
|
|
|
|
+// CHECK:STDOUT: %Self => constants.%Self.1
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: specific @ImplicitAs(i32) {
|
|
|
|
|
+// CHECK:STDOUT: %Dest => i32
|
|
|
|
|
+// CHECK:STDOUT: %Dest.patt => i32
|
|
|
|
|
+// CHECK:STDOUT:
|
|
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
|
|
|
|
|
+// CHECK:STDOUT: %Self => constants.%Self.2
|
|
|
|
|
+// CHECK:STDOUT: %Convert.type => constants.%Convert.type.2
|
|
|
|
|
+// CHECK:STDOUT: %Convert => constants.%Convert.2
|
|
|
|
|
+// CHECK:STDOUT: %.1 => constants.%.16
|
|
|
|
|
+// CHECK:STDOUT: %.2 => constants.%.17
|
|
|
|
|
+// CHECK:STDOUT: }
|
|
|
|
|
+// CHECK:STDOUT:
|