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
We shouldn't allow this as it can lead to unclear syntax and potentially result in the parser parsing things differently. For example, I'm not sure what happens with code like this:
SomeClass {
@field1 = value1 @field2 = value2
}
To resolve this, we should just require a comma after every assignment, except for the last assignment (i.e. no comma is needed if the next character is }).
Please list the exact steps necessary to reproduce the bug
Create test.inko with these contents:
class Foo {
let @a: Int
let @b: Int
}
class async Main {
fn async main {
Foo {
@a = 10
@b = 20
}
}
}
Then run inko check test.inko. This should fail with a parser error, but it doesn't.
Operating system
Fedora Silverblue 38
Inko version
main
Rust version
1.68.2
The text was updated successfully, but these errors were encountered:
Please describe the bug
While taking a look at https://github.com/dusty-phillips/inko-http/ I noticed that we don't error for code like this:
We shouldn't allow this as it can lead to unclear syntax and potentially result in the parser parsing things differently. For example, I'm not sure what happens with code like this:
To resolve this, we should just require a comma after every assignment, except for the last assignment (i.e. no comma is needed if the next character is
}
).Please list the exact steps necessary to reproduce the bug
Create
test.inko
with these contents:Then run
inko check test.inko
. This should fail with a parser error, but it doesn't.Operating system
Fedora Silverblue 38
Inko version
main
Rust version
1.68.2
The text was updated successfully, but these errors were encountered: