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

Named constructors are incorrectly transpiled #46

Open
JeroMiya opened this issue Jul 20, 2020 · 0 comments
Open

Named constructors are incorrectly transpiled #46

JeroMiya opened this issue Jul 20, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@JeroMiya
Copy link
Owner

Named constructors in dart are actual constructors. While we have to transpile them into static methods in C#, we also have to generate the corresponding constructor. Otherwise, we'll get syntax errors if there is no default constructor or if fields are readonly fields or properties.

The named constructor in Dart should be transpiled into a regular private constructor in C#, followed by a static method representing the named constructor which forwards the parameters to the internal constructor.

@JeroMiya JeroMiya added the bug Something isn't working label Jul 20, 2020
adospace pushed a commit to adospace/xamarin.flutter that referenced this issue Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant