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

Several changes on RTTI metadata for Python target #192

merged 3 commits into from Nov 6, 2017


Copy link

@dahlia dahlia commented Nov 5, 2017

  • As I suggested from nirum-lang/nirum-python#34 (comment), now generated Python classes have __nirum_type__ attribute which contains one of 'unboxed'/'enum'/'record'/'union'/'service'. The future versions of Python runtime library would be able to utilize this rather than diagnostics using isinstance()/hasattr() queries. See also examples on test_nirum_type().

  • Also as I suggested from the same comment above, now union classes have an immutable map named __nirum_tags__ that keys are tags and values are class objects. See also examples on test_nirum_tag_classes().

  • Since the bug #185 was also applicable to union tag enums, also fixed it. See also test_union_reserved_keyword_for_tag() to reproduce the bug.

@dahlia dahlia merged commit 9a1fc0c into nirum-lang:master Nov 6, 2017
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants