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

feat(transpiler): constructor and typed field semantics #45

Closed
wants to merge 1 commit into from

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Oct 1, 2014

fixes #11 (constructor and typed field semantics)
fixes #42 (Should we infer class property types from ctor args ?)
fixes #17 (number (js) should map to num (dart))

I am also looking for a general feedback on this PR: there is quite some refactoring in this PR to conform more to the Traceur architecture. IMO it makes the code easier to maintain long-term, feedback is welcome.

Difference with the original ticket (#11): @FINAL is not implemented. All fields are declared final if the ctor is const. If the ctor is not const, no fields will be final. I see little value in this annotation at least for now.

One thing that could be improved is that field must be initialized with a constant expression in Dart (for const ctor). This is not enforced right now but there is a TODO in the code. I think this could be implemented at a later point in time.

@vicb
Copy link
Contributor Author

vicb commented Oct 1, 2014

@vojtajina @mhevery @vsavkin This PR contains important architecture updates and it would be cool if it could be merged (or commented) quickly.

vicb referenced this pull request in vsavkin/angular Oct 2, 2014
@vicb vicb force-pushed the 1001-ctor branch 4 times, most recently from 364b97a to d0c0796 Compare October 2, 2014 09:14
fixes angular#11 (constructor and typed field semantics)
fixes angular#42 (Should we infer class property types from ctor args ?)
fixes angular#17 (number (js) should map to num (dart))
@vsavkin vsavkin mentioned this pull request Oct 2, 2014
vicb added a commit that referenced this pull request Oct 3, 2014
fixes #11 (constructor and typed field semantics)
fixes #42 (Should we infer class property types from ctor args ?)
fixes #17 (number (js) should map to num (dart))

Closes #45
@vicb vicb closed this in 089a2f1 Oct 3, 2014
@vicb vicb removed the in progress label Oct 3, 2014
@vicb vicb deleted the 1001-ctor branch December 3, 2015 16:53
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should we infer class property types from ctor args ? transpiler: constructor and typed field semantics
1 participant