Skip to content

Generate a default value for class parameters of anyAttribute#470

Merged
eed3si9n merged 2 commits intoeed3si9n:masterfrom
hosamaly:default-value-for-anyattribute
Mar 19, 2018
Merged

Generate a default value for class parameters of anyAttribute#470
eed3si9n merged 2 commits intoeed3si9n:masterfrom
hosamaly:default-value-for-anyattribute

Conversation

@hosamaly
Copy link
Copy Markdown
Contributor

@hosamaly 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().

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
@hosamaly hosamaly deleted the default-value-for-anyattribute branch March 19, 2018 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants