mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-03 03:32:37 +00:00
Fix default parameters on record types
This commit is contained in:
@@ -2122,7 +2122,7 @@ Ast *parse_operand(AstFile *f, bool lhs) {
|
||||
|
||||
if (allow_token(f, Token_OpenParen)) {
|
||||
isize param_count = 0;
|
||||
polymorphic_params = parse_field_list(f, ¶m_count, 0, Token_CloseParen, false, true);
|
||||
polymorphic_params = parse_field_list(f, ¶m_count, 0, Token_CloseParen, true, true);
|
||||
if (param_count == 0) {
|
||||
syntax_error(polymorphic_params, "Expected at least 1 polymorphic parameter");
|
||||
polymorphic_params = nullptr;
|
||||
@@ -2203,7 +2203,7 @@ Ast *parse_operand(AstFile *f, bool lhs) {
|
||||
|
||||
if (allow_token(f, Token_OpenParen)) {
|
||||
isize param_count = 0;
|
||||
polymorphic_params = parse_field_list(f, ¶m_count, 0, Token_CloseParen, false, true);
|
||||
polymorphic_params = parse_field_list(f, ¶m_count, 0, Token_CloseParen, true, true);
|
||||
if (param_count == 0) {
|
||||
syntax_error(polymorphic_params, "Expected at least 1 polymorphic parametric");
|
||||
polymorphic_params = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user