You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Detect type errors for bare return statements (#1508) (#1524)
Summary:
## Changes
1. Added `range` field to `ReturnExplicit` struct to track the return statement location
2. Updated `binding/function.rs` to pass the range when creating `ReturnExplicit`
3. Added type checking in `solve.rs` for bare return
## Testing
- ✅ Added 3 new test cases in returns.rs
<img width="1738" height="2120" alt="CleanShot 2025-11-07 at 10 29 00@2x" src="https://github.com/user-attachments/assets/baae6d23-befc-42b3-8e87-22727d61a441" />
Fixes#1508
Pull Request resolved: #1524
Reviewed By: grievejia
Differential Revision: D86550828
Pulled By: yangdanny97
fbshipit-source-id: 38267c7ac0f67a2053eb76bb06dd76e82499ea6a
0 commit comments