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

allow optional lists and maps #948

Open
sxlijin opened this issue Sep 12, 2024 · 0 comments
Open

allow optional lists and maps #948

sxlijin opened this issue Sep 12, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@sxlijin
Copy link
Collaborator

sxlijin commented Sep 12, 2024

We currently allow neither of these properties to be declared:

class Foo {
  a string[]?
  b map<string, string>?
}

because the parser, in its current error-correcting behavior, coerces an unset parameter into an empty list / map.

However, we've had numerous asks for this, and there's no good reason to impose this (somewhat artificial) restriction on our users, so we should just allow this in the type system and parser.

Users to update:

@aaronvg aaronvg added the good first issue Good for newcomers label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants