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

Generate a default value for class parameters of `anyAttribute` #470

Merged
merged 2 commits into from Mar 19, 2018

Conversation

@hosamaly
Copy link
Contributor

hosamaly commented Mar 19, 2018

Usually, generated classes have an attributes: Map parameter that defaults to an empty Map. However, a map generated for anyAttribute wasn't given a default value.

This commit adds a default value in that case.

There is also the trivial improvement of using Map.empty instead of Map.apply().

hosamaly added 2 commits Mar 19, 2018
Normally, generated classes have an `attributes: Map` parameter that
defaults to an empty Map. However, a map generated for `anyAttribute`
wasn't given a default value. This commit adds a default value in that
case.

There is also the trivial improvement of using `Map.empty` instead of
`Map.apply()`.
It doesn't affect anything but just for the sake of consistency.
@eed3si9n eed3si9n merged commit 733ecdc into eed3si9n:master Mar 19, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hosamaly hosamaly deleted the hosamaly:default-value-for-anyattribute branch Mar 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.