mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Model patterns as constant values (#5385)
This will enable us to simplify support for parameter and return patterns in import, which operates primarily on constants.
This commit is contained in:
+3
-3
@@ -57,7 +57,7 @@ fn H() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
|
||||
// CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0
|
||||
// CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.loc11_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_6.2 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -76,8 +76,8 @@ fn H() {
|
||||
// CHECK:STDOUT: fn() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %arr.patt: @G.%pattern_type (%pattern_type.d48) = binding_pattern arr
|
||||
// CHECK:STDOUT: %.loc13_3.1: @G.%pattern_type (%pattern_type.d48) = var_pattern %arr.patt
|
||||
// CHECK:STDOUT: %arr.patt: @G.%pattern_type (%pattern_type.d48) = binding_pattern arr [concrete]
|
||||
// CHECK:STDOUT: %.loc13_3.1: @G.%pattern_type (%pattern_type.d48) = var_pattern %arr.patt [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %arr.var: ref @G.%array_type.loc13_22.2 (%array_type.281) = var arr
|
||||
// CHECK:STDOUT: %.loc13_27.1: %empty_tuple.type = tuple_literal ()
|
||||
|
||||
Reference in New Issue
Block a user