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
Here's the whole error: notice that the real problem is that the actual return type doesn't match the expected return type --- this has nothing to do with recursive / forward-declared functions!
Interestingly, it goes away if we try just functions with numbers. 🤔
jiribenes
changed the title
Misleading error "recursive functions need annotated return types" on return type mismatch
Misleading error "recursive functions need annotated return types"
Mar 22, 2024
Here's the whole error: notice that the real problem is that the actual return type doesn't match the expected return type --- this has nothing to do with recursive / forward-declared functions!
![Screenshot 2024-03-22 at 16 53 41](https://private-user-images.githubusercontent.com/11269173/316087016-a4599aa3-6151-4e33-9bbe-a0887310d4da.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2MTMwNDksIm5iZiI6MTcxOTYxMjc0OSwicGF0aCI6Ii8xMTI2OTE3My8zMTYwODcwMTYtYTQ1OTlhYTMtNjE1MS00ZTMzLTliYmUtYTA4ODczMTBkNGRhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI4VDIyMTIyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM2OTNiMmU1NGRhZmEzMjUyNjE4MGFkZGM4MzhjZGYxNWFlNWNlNDZmMTk0ZTRlODkxNjI4YjNhNDhiMmM1ZDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.L9UhA-QI3cDjwWejTYHbcCZaY_SPo36orxKB3jBWnPg)
Interestingly, it goes away if we try just functions with numbers. 🤔
Repro:
Originally reported by @mlutze
The text was updated successfully, but these errors were encountered: