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

Add constructor keyword #2691

Merged
merged 3 commits into from Oct 31, 2022
Merged

Add constructor keyword #2691

merged 3 commits into from Oct 31, 2022

Conversation

atyrin
Copy link
Contributor

@atyrin atyrin commented Oct 3, 2022

  • switch fun keyword to constructor for class constructors
  • remove a class name from the constructor
  • remove rendering of modifiers that are not applied to the constructor

fix #2689
probably, bring something to #1930

* switch `fun` keyword to `constructor` for class constructors
* remove class name from constructor
* remove rendering of modifiers that not applies to constructor
Copy link
Member

@IgnatBeresnev IgnatBeresnev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

It's better to see something once than to hear about it a thousand times, so I've attached a patch with how I would fix my comments - it's difficult to explain it all in text, so hopefully this saves us some going back and forth, and gives you a general idea. Free free to either apply it fully or modify it to your liking

Patch (for some reason github does not let me attach it as a file, so here's a link): https://github.com/IgnatBeresnev/static/blob/main/patch/2691_test_refactoring.patch

Copy link
Member

@IgnatBeresnev IgnatBeresnev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@IgnatBeresnev IgnatBeresnev merged commit c0aece9 into master Oct 31, 2022
@IgnatBeresnev IgnatBeresnev deleted the constructor-rename branch October 31, 2022 12:42
atyrin added a commit that referenced this pull request Nov 1, 2022
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.

Change constructor signature from fun() to constructor()
2 participants