mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 19:31:08 +01:00
Implement the toolchain side of proposal #7254, removing the `:!` binding syntax for generic and template parameters in favor of the keywords `generic`, `template`, and `runtime` plus contextual defaults for phase. For valid programs this is semantics-preserving: each binding resolves to the same phase, and produces the same SemIR, as it did under `:!`/`:`. The parser derives a binding's phase from its syntactic context plus any explicit phase keyword; new diagnostics and error recovery for misused keywords are described below. Implementation details for each component: - Lexer: remove the `:!` (`ColonExclaim`) token, move its virtual parse-node budget onto `:`, and add the `generic` and `runtime` keywords. - Parser: thread a `BindingContext` (`ExplicitParam`, `DeducedParam`, or `CompileTimeEntityParam`) from declaration introducers down through parameter lists to each binding pattern, using a one-token lookahead to distinguish a name-qualifier parameter list from a declaration's own final list. Parameters of a compile-time entity (`class`, `interface`, `constraint`, `choice`, `alias`, `export`, `namespace`) and deduced `[]` parameters default to checked generic; explicit function parameters and local bindings default to runtime. `HandleBindingPattern` resolves the phase from that context plus the keyword: a `generic` keyword needs no node of its own (the phase is carried by the binding's node kind), while a `runtime` keyword is preserved as a `RuntimeBindingName` node so `check` can name it in a diagnostic. A phase keyword that is merely redundant with the contextual default is diagnosed here, without invalidating the parse tree. - Check: a phase keyword that is invalid for its context (for example `runtime` on a checked-generic parameter) is diagnosed here, and recovers by building an error binding that still introduces the name so that later uses of it do not produce cascading errors. The removed `:!` syntax is now rejected as an ordinary parse error. The `form`/`:?`/`->?` ("extended types") portion of proposal #7254 is left for a separate change. Assisted-by: Claude Code
628 lines
33 KiB
Plaintext
628 lines
33 KiB
Plaintext
// 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
|
|
//
|
|
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon
|
|
// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
|
|
// EXTRA-ARGS: --dump-sem-ir-ranges=if-present
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/class/generic/redeclare.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/generic/redeclare.carbon
|
|
|
|
// --- valid.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class Generic(T: type);
|
|
|
|
class Generic(T: type) {
|
|
}
|
|
|
|
// --- fail_mismatch_param_list.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class A;
|
|
// CHECK:STDERR: fail_mismatch_param_list.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter list [RedeclParamListDiffers]
|
|
// CHECK:STDERR: class A(T: type) {}
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR: fail_mismatch_param_list.carbon:[[@LINE-4]]:1: note: previously declared without parameter list [RedeclParamListPrevious]
|
|
// CHECK:STDERR: class A;
|
|
// CHECK:STDERR: ^~~~~~~~
|
|
// CHECK:STDERR:
|
|
class A(T: type) {}
|
|
|
|
// --- fail_mismatch_implicit_param_list.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class A {}
|
|
|
|
class B(N: A);
|
|
// CHECK:STDERR: fail_mismatch_implicit_param_list.carbon:[[@LINE+7]]:1: error: redeclaration differs because of implicit parameter list [RedeclParamListDiffers]
|
|
// CHECK:STDERR: class B[T: type](N: T) {}
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR: fail_mismatch_implicit_param_list.carbon:[[@LINE-4]]:1: note: previously declared without implicit parameter list [RedeclParamListPrevious]
|
|
// CHECK:STDERR: class B(N: A);
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
class B[T: type](N: T) {}
|
|
|
|
// --- fail_mismatch_param_count.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class A {}
|
|
|
|
class C(T: type);
|
|
// CHECK:STDERR: fail_mismatch_param_count.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter count of 2 [RedeclParamCountDiffers]
|
|
// CHECK:STDERR: class C(T: type, U: A) {}
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR: fail_mismatch_param_count.carbon:[[@LINE-4]]:1: note: previously declared with parameter count of 1 [RedeclParamCountPrevious]
|
|
// CHECK:STDERR: class C(T: type);
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
class C(T: type, U: A) {}
|
|
|
|
// --- fail_mismatch_param_type.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class A {}
|
|
|
|
class D(T: type);
|
|
// CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE+7]]:9: error: type `<pattern for A>` of parameter 1 in redeclaration differs from previous parameter type `<pattern for type>` [RedeclParamDiffersType]
|
|
// CHECK:STDERR: class D(T: A) {}
|
|
// CHECK:STDERR: ^~~~
|
|
// CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE-4]]:9: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
|
|
// CHECK:STDERR: class D(T: type);
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
class D(T: A) {}
|
|
|
|
// --- fail_mismatch_param_name.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class E(T: type);
|
|
// CHECK:STDERR: fail_mismatch_param_name.carbon:[[@LINE+7]]:9: error: redeclaration differs at parameter 1 [RedeclParamDiffers]
|
|
// CHECK:STDERR: class E(U: type) {}
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR: fail_mismatch_param_name.carbon:[[@LINE-4]]:9: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
|
|
// CHECK:STDERR: class E(T: type);
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
class E(U: type) {}
|
|
|
|
// CHECK:STDOUT: --- valid.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
|
|
// CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [concrete]
|
|
// CHECK:STDOUT: %Generic.generic: %Generic.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Generic: type = class_type @Generic, @Generic(%T) [symbolic]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .Generic = %Generic.decl.loc4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %Generic.decl.loc4: %Generic.type = class_decl @Generic [concrete = constants.%Generic.generic] {
|
|
// CHECK:STDOUT: %T.patt.loc6: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4 (constants.%T.patt)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] {
|
|
// CHECK:STDOUT: %.Self.frozen.loc4: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Generic.decl.loc6: %Generic.type = class_decl @Generic [concrete = constants.%Generic.generic] {
|
|
// CHECK:STDOUT: %T.patt.loc6: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4 (constants.%T.patt)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc6_18.1: type = splice_block %.loc6_18.2 [concrete = type] {
|
|
// CHECK:STDOUT: %.Self.frozen.loc6: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %.loc6_18.2: type = type_literal type [concrete = type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %T.loc6: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @Generic(%T.loc4_16.2: type) {
|
|
// CHECK:STDOUT: %T.patt.loc4: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4 (constants.%T.patt)]
|
|
// CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
|
|
// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%Generic
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Generic(constants.%T) {
|
|
// CHECK:STDOUT: %T.patt.loc4 => constants.%T.patt
|
|
// CHECK:STDOUT: %T.loc4_16.1 => constants.%T
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_mismatch_param_list.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %A.5a2: type = class_type @A.loc4 [concrete]
|
|
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
|
|
// CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %A.type: type = generic_class_type @A.loc12 [concrete]
|
|
// CHECK:STDOUT: %A.generic: %A.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %A.47a: type = class_type @A.loc12, @A.loc12(%T) [symbolic]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .A = %A.decl.loc4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %A.decl.loc4: type = class_decl @A.loc4 [concrete = constants.%A.5a2] {} {}
|
|
// CHECK:STDOUT: %A.decl.loc12: %A.type = class_decl @A.loc12 [concrete = constants.%A.generic] {
|
|
// CHECK:STDOUT: %T.patt.loc12_10.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_10.2 (constants.%T.patt)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc12_12.1: type = splice_block %.loc12_12.2 [concrete = type] {
|
|
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %.loc12_12.2: type = type_literal type [concrete = type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %T.loc12_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc12_10.1 (constants.%T)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class @A.loc4;
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @A.loc12(%T.loc12_10.2: type) {
|
|
// CHECK:STDOUT: %T.patt.loc12_10.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_10.2 (constants.%T.patt)]
|
|
// CHECK:STDOUT: %T.loc12_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc12_10.1 (constants.%T)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
|
|
// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%A.47a
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @A.loc12(constants.%T) {
|
|
// CHECK:STDOUT: %T.patt.loc12_10.2 => constants.%T.patt
|
|
// CHECK:STDOUT: %T.loc12_10.1 => constants.%T
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_mismatch_implicit_param_list.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %A: type = class_type @A [concrete]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %pattern_type.9ef: type = pattern_type %A [concrete]
|
|
// CHECK:STDOUT: %N.patt.3a1: %pattern_type.9ef = symbolic_binding_pattern N, 0 [symbolic]
|
|
// CHECK:STDOUT: %N.37f: %A = symbolic_binding N, 0 [symbolic]
|
|
// CHECK:STDOUT: %B.type.7937a9.1: type = generic_class_type @B.loc6 [concrete]
|
|
// CHECK:STDOUT: %B.generic.60ca48.1: %B.type.7937a9.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
|
|
// CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic]
|
|
// CHECK:STDOUT: %N.patt.9f0: %pattern_type.51d = symbolic_binding_pattern N, 1 [symbolic]
|
|
// CHECK:STDOUT: %N.bd9: %T = symbolic_binding N, 1 [symbolic]
|
|
// CHECK:STDOUT: %B.type.7937a9.2: type = generic_class_type @B.loc14 [concrete]
|
|
// CHECK:STDOUT: %B.generic.60ca48.2: %B.type.7937a9.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %B.2b1: type = class_type @B.loc14, @B.loc14(%T, %N.bd9) [symbolic]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .A = %A.decl
|
|
// CHECK:STDOUT: .B = %B.decl.loc6
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {}
|
|
// CHECK:STDOUT: %B.decl.loc6: %B.type.7937a9.1 = class_decl @B.loc6 [concrete = constants.%B.generic.60ca48.1] {
|
|
// CHECK:STDOUT: %N.patt.loc6_10.1: %pattern_type.9ef = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_10.2 (constants.%N.patt.3a1)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc6: type = splice_block %A.ref [concrete = constants.%A] {
|
|
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %N.loc6_10.2: %A = symbolic_binding N, 0 [symbolic = %N.loc6_10.1 (constants.%N.37f)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %B.decl.loc14: %B.type.7937a9.2 = class_decl @B.loc14 [concrete = constants.%B.generic.60ca48.2] {
|
|
// CHECK:STDOUT: %T.patt.loc14_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_10.2 (constants.%T.patt)]
|
|
// CHECK:STDOUT: %N.patt.loc14_19.1: @B.loc14.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc14_19.2 (constants.%N.patt.9f0)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc14_12.1: type = splice_block %.loc14_12.2 [concrete = type] {
|
|
// CHECK:STDOUT: %.Self.frozen.loc14_10: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %.loc14_12.2: type = type_literal type [concrete = type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %T.loc14_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc14_10.1 (constants.%T)]
|
|
// CHECK:STDOUT: %.loc14_21: type = splice_block %T.ref [symbolic = %T.loc14_10.1 (constants.%T)] {
|
|
// CHECK:STDOUT: %.Self.frozen.loc14_19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_10.2 [symbolic = %T.loc14_10.1 (constants.%T)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %N.loc14_19.2: @B.loc14.%T.loc14_10.1 (%T) = symbolic_binding N, 1 [symbolic = %N.loc14_19.1 (constants.%N.bd9)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class @A {
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
|
|
// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%A
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @B.loc6(%N.loc6_10.2: %A) {
|
|
// CHECK:STDOUT: %N.patt.loc6_10.2: %pattern_type.9ef = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_10.2 (constants.%N.patt.3a1)]
|
|
// CHECK:STDOUT: %N.loc6_10.1: %A = symbolic_binding N, 0 [symbolic = %N.loc6_10.1 (constants.%N.37f)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class;
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @B.loc14(%T.loc14_10.2: type, %N.loc14_19.2: @B.loc14.%T.loc14_10.1 (%T)) {
|
|
// CHECK:STDOUT: %T.patt.loc14_10.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_10.2 (constants.%T.patt)]
|
|
// CHECK:STDOUT: %T.loc14_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc14_10.1 (constants.%T)]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc14_10.1 [symbolic = %pattern_type (constants.%pattern_type.51d)]
|
|
// CHECK:STDOUT: %N.patt.loc14_19.2: @B.loc14.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc14_19.2 (constants.%N.patt.9f0)]
|
|
// CHECK:STDOUT: %N.loc14_19.1: @B.loc14.%T.loc14_10.1 (%T) = symbolic_binding N, 1 [symbolic = %N.loc14_19.1 (constants.%N.bd9)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
|
|
// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%B.2b1
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @B.loc6(constants.%N.37f) {
|
|
// CHECK:STDOUT: %N.patt.loc6_10.2 => constants.%N.patt.3a1
|
|
// CHECK:STDOUT: %N.loc6_10.1 => constants.%N.37f
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @B.loc14(constants.%T, constants.%N.bd9) {
|
|
// CHECK:STDOUT: %T.patt.loc14_10.2 => constants.%T.patt
|
|
// CHECK:STDOUT: %T.loc14_10.1 => constants.%T
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
|
|
// CHECK:STDOUT: %N.patt.loc14_19.2 => constants.%N.patt.9f0
|
|
// CHECK:STDOUT: %N.loc14_19.1 => constants.%N.bd9
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_mismatch_param_count.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %A: type = class_type @A [concrete]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
|
|
// CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %C.type.a601fe.1: type = generic_class_type @C.loc6 [concrete]
|
|
// CHECK:STDOUT: %C.generic.4b4597.1: %C.type.a601fe.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.9ef: type = pattern_type %A [concrete]
|
|
// CHECK:STDOUT: %U.patt: %pattern_type.9ef = symbolic_binding_pattern U, 1 [symbolic]
|
|
// CHECK:STDOUT: %U: %A = symbolic_binding U, 1 [symbolic]
|
|
// CHECK:STDOUT: %C.type.a601fe.2: type = generic_class_type @C.loc14 [concrete]
|
|
// CHECK:STDOUT: %C.generic.4b4597.2: %C.type.a601fe.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %C.394: type = class_type @C.loc14, @C.loc14(%T, %U) [symbolic]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .A = %A.decl
|
|
// CHECK:STDOUT: .C = %C.decl.loc6
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {}
|
|
// CHECK:STDOUT: %C.decl.loc6: %C.type.a601fe.1 = class_decl @C.loc6 [concrete = constants.%C.generic.4b4597.1] {
|
|
// CHECK:STDOUT: %T.patt.loc6_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_10.2 (constants.%T.patt)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.2 [concrete = type] {
|
|
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %.loc6_12.2: type = type_literal type [concrete = type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %T.loc6_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_10.1 (constants.%T)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %C.decl.loc14: %C.type.a601fe.2 = class_decl @C.loc14 [concrete = constants.%C.generic.4b4597.2] {
|
|
// CHECK:STDOUT: %T.patt.loc14_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_10.2 (constants.%T.patt)]
|
|
// CHECK:STDOUT: %U.patt.loc14_19.1: %pattern_type.9ef = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc14_19.2 (constants.%U.patt)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc14_12.1: type = splice_block %.loc14_12.2 [concrete = type] {
|
|
// CHECK:STDOUT: %.Self.frozen.loc14_10: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %.loc14_12.2: type = type_literal type [concrete = type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %T.loc14_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc14_10.1 (constants.%T)]
|
|
// CHECK:STDOUT: %.loc14_21: type = splice_block %A.ref [concrete = constants.%A] {
|
|
// CHECK:STDOUT: %.Self.frozen.loc14_19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %U.loc14_19.2: %A = symbolic_binding U, 1 [symbolic = %U.loc14_19.1 (constants.%U)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class @A {
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
|
|
// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%A
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @C.loc6(%T.loc6_10.2: type) {
|
|
// CHECK:STDOUT: %T.patt.loc6_10.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_10.2 (constants.%T.patt)]
|
|
// CHECK:STDOUT: %T.loc6_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_10.1 (constants.%T)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class;
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @C.loc14(%T.loc14_10.2: type, %U.loc14_19.2: %A) {
|
|
// CHECK:STDOUT: %T.patt.loc14_10.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_10.2 (constants.%T.patt)]
|
|
// CHECK:STDOUT: %T.loc14_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc14_10.1 (constants.%T)]
|
|
// CHECK:STDOUT: %U.patt.loc14_19.2: %pattern_type.9ef = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc14_19.2 (constants.%U.patt)]
|
|
// CHECK:STDOUT: %U.loc14_19.1: %A = symbolic_binding U, 1 [symbolic = %U.loc14_19.1 (constants.%U)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
|
|
// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%C.394
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C.loc6(constants.%T) {
|
|
// CHECK:STDOUT: %T.patt.loc6_10.2 => constants.%T.patt
|
|
// CHECK:STDOUT: %T.loc6_10.1 => constants.%T
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C.loc14(constants.%T, constants.%U) {
|
|
// CHECK:STDOUT: %T.patt.loc14_10.2 => constants.%T.patt
|
|
// CHECK:STDOUT: %T.loc14_10.1 => constants.%T
|
|
// CHECK:STDOUT: %U.patt.loc14_19.2 => constants.%U.patt
|
|
// CHECK:STDOUT: %U.loc14_19.1 => constants.%U
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_mismatch_param_type.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %A: type = class_type @A [concrete]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
|
|
// CHECK:STDOUT: %T.patt.d47: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %D.type.ff75f2.1: type = generic_class_type @D.loc6 [concrete]
|
|
// CHECK:STDOUT: %D.generic.7223e9.1: %D.type.ff75f2.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.9ef: type = pattern_type %A [concrete]
|
|
// CHECK:STDOUT: %T.patt.3a1: %pattern_type.9ef = symbolic_binding_pattern T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T.37f: %A = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %D.type.ff75f2.2: type = generic_class_type @D.loc14 [concrete]
|
|
// CHECK:STDOUT: %D.generic.7223e9.2: %D.type.ff75f2.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %D.ad0: type = class_type @D.loc14, @D.loc14(%T.37f) [symbolic]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .A = %A.decl
|
|
// CHECK:STDOUT: .D = %D.decl.loc6
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {}
|
|
// CHECK:STDOUT: %D.decl.loc6: %D.type.ff75f2.1 = class_decl @D.loc6 [concrete = constants.%D.generic.7223e9.1] {
|
|
// CHECK:STDOUT: %T.patt.loc6_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_10.2 (constants.%T.patt.d47)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.2 [concrete = type] {
|
|
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %.loc6_12.2: type = type_literal type [concrete = type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %T.loc6_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_10.1 (constants.%T.67d)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %D.decl.loc14: %D.type.ff75f2.2 = class_decl @D.loc14 [concrete = constants.%D.generic.7223e9.2] {
|
|
// CHECK:STDOUT: %T.patt.loc14_10.1: %pattern_type.9ef = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_10.2 (constants.%T.patt.3a1)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc14: type = splice_block %A.ref [concrete = constants.%A] {
|
|
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %T.loc14_10.2: %A = symbolic_binding T, 0 [symbolic = %T.loc14_10.1 (constants.%T.37f)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class @A {
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
|
|
// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%A
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @D.loc6(%T.loc6_10.2: type) {
|
|
// CHECK:STDOUT: %T.patt.loc6_10.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_10.2 (constants.%T.patt.d47)]
|
|
// CHECK:STDOUT: %T.loc6_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_10.1 (constants.%T.67d)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class;
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @D.loc14(%T.loc14_10.2: %A) {
|
|
// CHECK:STDOUT: %T.patt.loc14_10.2: %pattern_type.9ef = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_10.2 (constants.%T.patt.3a1)]
|
|
// CHECK:STDOUT: %T.loc14_10.1: %A = symbolic_binding T, 0 [symbolic = %T.loc14_10.1 (constants.%T.37f)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
|
|
// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%D.ad0
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @D.loc6(constants.%T.67d) {
|
|
// CHECK:STDOUT: %T.patt.loc6_10.2 => constants.%T.patt.d47
|
|
// CHECK:STDOUT: %T.loc6_10.1 => constants.%T.67d
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @D.loc14(constants.%T.37f) {
|
|
// CHECK:STDOUT: %T.patt.loc14_10.2 => constants.%T.patt.3a1
|
|
// CHECK:STDOUT: %T.loc14_10.1 => constants.%T.37f
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_mismatch_param_name.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
|
|
// CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %E.type.0b1ef1.1: type = generic_class_type @E.loc4 [concrete]
|
|
// CHECK:STDOUT: %E.generic.5469ef.1: %E.type.0b1ef1.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %U.patt: %pattern_type = symbolic_binding_pattern U, 0 [symbolic]
|
|
// CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic]
|
|
// CHECK:STDOUT: %E.type.0b1ef1.2: type = generic_class_type @E.loc12 [concrete]
|
|
// CHECK:STDOUT: %E.generic.5469ef.2: %E.type.0b1ef1.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %E.7de02e.2: type = class_type @E.loc12, @E.loc12(%U) [symbolic]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .E = %E.decl.loc4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %E.decl.loc4: %E.type.0b1ef1.1 = class_decl @E.loc4 [concrete = constants.%E.generic.5469ef.1] {
|
|
// CHECK:STDOUT: %T.patt.loc4_10.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_10.2 (constants.%T.patt)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc4_12.1: type = splice_block %.loc4_12.2 [concrete = type] {
|
|
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %.loc4_12.2: type = type_literal type [concrete = type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %T.loc4_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_10.1 (constants.%T)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %E.decl.loc12: %E.type.0b1ef1.2 = class_decl @E.loc12 [concrete = constants.%E.generic.5469ef.2] {
|
|
// CHECK:STDOUT: %U.patt.loc12_10.1: %pattern_type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc12_10.2 (constants.%U.patt)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc12_12.1: type = splice_block %.loc12_12.2 [concrete = type] {
|
|
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %.loc12_12.2: type = type_literal type [concrete = type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %U.loc12_10.2: type = symbolic_binding U, 0 [symbolic = %U.loc12_10.1 (constants.%U)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @E.loc4(%T.loc4_10.2: type) {
|
|
// CHECK:STDOUT: %T.patt.loc4_10.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_10.2 (constants.%T.patt)]
|
|
// CHECK:STDOUT: %T.loc4_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_10.1 (constants.%T)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class;
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @E.loc12(%U.loc12_10.2: type) {
|
|
// CHECK:STDOUT: %U.patt.loc12_10.2: %pattern_type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc12_10.2 (constants.%U.patt)]
|
|
// CHECK:STDOUT: %U.loc12_10.1: type = symbolic_binding U, 0 [symbolic = %U.loc12_10.1 (constants.%U)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
|
|
// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%E.7de02e.2
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @E.loc4(constants.%T) {
|
|
// CHECK:STDOUT: %T.patt.loc4_10.2 => constants.%T.patt
|
|
// CHECK:STDOUT: %T.loc4_10.1 => constants.%T
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @E.loc12(constants.%U) {
|
|
// CHECK:STDOUT: %U.patt.loc12_10.2 => constants.%U.patt
|
|
// CHECK:STDOUT: %U.loc12_10.1 => constants.%U
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|