-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revised elaboration of function definitions, part 1
Partial revert of commit ec95665. That commit introduced a "keep_ty" parameter to type elaboration functions telling them to keep struct/union definitions occurring in function parameter lists and lift them to the outer environment. By setting keep_ty to true, the following could typecheck: int f(struct s { int a; } x) { return x.a; } However, "struct s" would escape the scope of the function definition and leak to the top-level environment, which is not correct. In subsequent commits we'll address the issues above differently, in a way that does not need the "keep_ty = true" behavior.
- Loading branch information
1 parent
e2c2f22
commit 2e2d343
Showing
1 changed file
with
40 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters