Parse vars in classes the same as vars in other locations (#7188)

Class vars are still restricted to simple `name: type` bindings, not
full patterns. This is now handled in the check phase instead of during
parsing.

This is in preparation for supporting `static var`.
This commit is contained in:
Nicholas Bishop
2026-05-13 21:22:46 +00:00
committed by GitHub
parent 5706601096
commit bd918fb33b
91 changed files with 370 additions and 660 deletions
-1
View File
@@ -158,7 +158,6 @@ fn Run() -> i32 {
// CHECK:STDOUT: %return.param.loc20: ref %i32 = out_param call_param1
// CHECK:STDOUT: %return.loc20: ref %i32 = return_slot %return.param.loc20
// CHECK:STDOUT: }
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %.loc22: %Class.elem = field_decl k, element0 [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%struct_type.k [concrete = constants.%complete_type.954]
// CHECK:STDOUT: complete_type_witness = %complete_type