diff options
| author | Mustafa Quraish <[email protected]> | 2022-02-01 17:59:47 -0500 |
|---|---|---|
| committer | Mustafa Quraish <[email protected]> | 2022-02-01 17:59:47 -0500 |
| commit | abb5fd19ca12f51b6a0298d5fe8d019bd12445af (patch) | |
| tree | cf6d9ff6018751e7bb4d796b0541f4dd30dec489 /src/ast.c | |
| parent | Add basic `defer` implementation. (diff) | |
| download | cup-abb5fd19ca12f51b6a0298d5fe8d019bd12445af.tar.xz cup-abb5fd19ca12f51b6a0298d5fe8d019bd12445af.zip | |
Defer: Pop elements off the defer-stack when returning
We restore the count later, but this fix makes it so that the compiler
doesn't get stuck in an infinite loop when you try to compile the
following code:
```
fn main(): int {
defer return 5;
return 1;
}
```
Diffstat (limited to 'src/ast.c')
0 files changed, 0 insertions, 0 deletions