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

@@ -621,9 +621,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @D {
// CHECK:STDOUT: %i32.loc5: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %.loc5: %D.elem = field_decl a, element0 [concrete]
// CHECK:STDOUT: %i32.loc6: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %.loc6: %D.elem = field_decl b, element1 [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%struct_type.a.b.501 [concrete = constants.%complete_type.705]
// CHECK:STDOUT: complete_type_witness = %complete_type