-
-
Notifications
You must be signed in to change notification settings - Fork 873
Fixes #4984 #4992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fixes #4984 #4992
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Could you use an if let Some
with an early return
for this please, similar to the error above for FunctionDefinitionAngleGenerics
.
We'll need tests to be added too. The ones for FunctionDefinitionAngleGenerics
would be a good example for what they would look like, you can see them in this PR #4818
@lpil, I need your help in writing tests for these changes. I have written the following test; however, it is failing. #[test]
fn wrong_function_return_type_declaration_using_colon_instead_of_right_arrow() {
assert_module_error!(
r#"
pub fn main(): Nil {}
"#
);
} |
You probably need to accept the snapshot. We use snapshot testing in the Gleam compiler, so once you run the test, you need to run |
@GearsDatapacks, please review the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! One tiny note
@GearsDatapacks, I have updated the code with the suggested change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Need Louis to review it before merging though
@lpil Please review the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely work! Thank you very much!
I've left one tiny note inline, and would you mind updating the changelog too please 🙏
Ah! The build is failing because of a CI problem. If you rebase on main to the latest code changes then it should be fixed. |
@lpil, I will rebase it on the main branch and update the CHANGELOG.md file. |
@lpil, Please review the pull request. |
You've done a merge commit rather than a rebase, so the build is failing as we do not permit them. Could you rebase on main please 🙏 That will remove the merge commit for you. |
@lpil, I have no idea how to perform a rebase. Now, how do I revert the accidental merge? I just ran |
@baraich I think we could possibly help you out on community discord. |
@inoas, is there an invite link? |
|
When trying to specify return types for a function using a
:
, it now displays a better error message.