🐞 Bugfix: Ensure that typed functions contain a return statement #143

Closed
opened 2023-07-13 12:50:25 +01:00 by deavmi · 4 comments
Owner

What is this?

Ensure that a ReturnStmt is present in a function declared with a type in the parser, if not throw an error.

  • Basic check
  • Ensure we only enforce this check when the wantsBody is true, else efunc extern statement (which have no body) will cause it to error as no body is present
  • Add a negative test case
## What is this? Ensure that a `ReturnStmt` is present in a function declared with a type in the parser, if not throw an error. - [x] Basic check - [x] Ensure we only enforce this check when the `wantsBody` is `true`, else `efunc` extern statement (which have no body) will cause it to error as no body is present - [x] Add a negative test case
deavmi added this to the Basics milestone 2023-07-13 12:50:30 +01:00
deavmi self-assigned this 2023-07-13 12:50:32 +01:00
deavmi added the
parser
label 2023-07-13 12:50:35 +01:00
deavmi added this to the Parser project 2023-07-13 12:50:38 +01:00
deavmi added the due date 2023-07-14 2023-07-13 12:51:19 +01:00
deavmi added reference bugfix/require_return 2023-07-13 12:51:35 +01:00
deavmi changed title from Bugfix: Ensure that typed functions contain a return statement to 🐞 Bugfix: Ensure that typed functions contain a return statement 2023-07-13 12:51:46 +01:00
deavmi added spent time 2023-07-13 12:57:43 +01:00
6 minutes
deavmi started working 2023-07-13 12:57:45 +01:00
deavmi stopped working 2023-07-13 12:59:14 +01:00
1 minute 29 seconds
deavmi modified the due date from 2023-07-14 to 2023-07-20 2023-07-13 12:59:22 +01:00
deavmi started working 2023-07-16 14:56:04 +01:00
deavmi stopped working 2023-07-16 14:56:06 +01:00
2 seconds
deavmi added spent time 2023-07-16 14:56:10 +01:00
3 minutes
deavmi started working 2023-07-16 14:56:12 +01:00
deavmi stopped working 2023-07-16 14:56:26 +01:00
14 seconds
deavmi started working 2023-07-16 14:59:00 +01:00
Author
Owner

Looks like all good for now, wanna first finish universal coercion

Looks like all good for now, wanna first finish universal coercion
deavmi stopped working 2023-07-16 14:59:40 +01:00
40 seconds
deavmi added a new dependency 2023-07-16 15:00:32 +01:00
deavmi started working 2023-07-16 17:22:26 +01:00
Author
Owner

Actually finna merge this now

Actually finna merge this now
deavmi removed a dependency 2023-07-16 17:22:35 +01:00
Author
Owner

Merging...

Merging...
Author
Owner

CI/CD has an error where expected due to type mis-match (will be fixed when feature/universal_coercion is merged)

CI/CD has an error where expected due to type mis-match (will be fixed when `feature/universal_coercion` is merged)
deavmi stopped working 2023-07-16 17:24:08 +01:00
1 minute 42 seconds
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Total Time Spent: 13 minutes 7 seconds
deavmi
13 minutes 7 seconds
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

2023-07-20

Dependencies

No dependencies set.

Reference: tlang/tlang#143
No description provided.