Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 081a3fc

Browse files
Added check for valid RECORD when initializing a variable
1 parent c94e353 commit 081a3fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎grammar.y‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ Stmnt : EOL { $$ = new Empty; prev->link($$); prev = $$; }
204204
}
205205
}
206206
| ID ASSIGN ID LCURL Args RCURL EOL {
207+
if (!table->check($3).first || table->type($3) != ExpI::RecordT) {
208+
error(@1, "no such record: " + $3);
209+
YYERROR;
210+
}
207211
if (5ドル.size() != std::get<RecordT>(table->value($3)).size()) {
208212
error(@2, "wrong number of fields for record type: " + $3);
209213
YYERROR;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /