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 authored and GitHub committed 2026-05-13 21:22:46 +00:00
1 parent 5706601096
commit bd918fb33b
91 files changed
+370 -660

No files matched your search

@@ -146,9 +146,6 @@ fn G() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %int_100: Core.IntLiteral = int_value 100 [concrete = constants.%int_100]
// CHECK:STDOUT: %array_type: type = array_type %int_100, %i32 [concrete = constants.%array_type]
// CHECK:STDOUT: %.loc19: %C.elem = field_decl arr, element0 [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%struct_type.arr.5f2 [concrete = constants.%complete_type.22a]
// CHECK:STDOUT: complete_type_witness = %complete_type