Skip to content
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

Passing objects without {} sometimes ambiguous #876

Open
familyfriendlymikey opened this issue Oct 13, 2023 · 5 comments
Open

Passing objects without {} sometimes ambiguous #876

familyfriendlymikey opened this issue Oct 13, 2023 · 5 comments
Labels

Comments

@familyfriendlymikey
Copy link
Member

Description

Works as intended:

cb! if await model.update { bool: yes }

Does not work as intended:

cb! if await model.update
	bool: yes

Reproduction

No response

System Environment

No response

@haikyuu
Copy link
Collaborator

haikyuu commented Oct 13, 2023

I find the second example very confusing. I understand if the parser feels the same 😅

@familyfriendlymikey
Copy link
Member Author

I just think if it's ambiguous like this then the compiler should throw or something.

@haikyuu
Copy link
Collaborator

haikyuu commented Oct 13, 2023

Yeah, I've also faced this quite a bit recently. The app isn't working, and I receive no error. I usually work around it by manually compiling imbac suspect.imba which is obviously not a good experience. Sometimes it takes time to know what's going on!

@madmaniak
Copy link
Member

madmaniak commented Oct 13, 2023

The second one looks like a hash in an if statement - so what should compiler throw in this situation?
In some languages if you wanted to stick to the first line interpretation you would use \ before new line..

@madmaniak
Copy link
Member

Didn't notice the cb() method - in that case I have no idea how to interpret it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants