Skip to content

Conversation

@pierredup
Copy link
Contributor

  • bug fix? Yes
  • BC break? yes
  • doc PR: N/A

Classes and methods cannot be declared final and abstract. This will now throw an exception if you try to generate a final abstract class or method. It's a BC break because of the new exception, but the generated code would never have been valid, so I doubt there is any use that will break

@dg
Copy link
Member

dg commented Aug 28, 2018

It's probably better to check it when the code is generated, to allow this anytime:

$class->setAbstract(true)->setFinal(false);

ie. in cases when $class is already marked as final

@dg dg merged commit a0178d7 into nette:master Aug 28, 2018
dg pushed a commit that referenced this pull request Aug 28, 2018
dg pushed a commit that referenced this pull request Aug 28, 2018
dg pushed a commit that referenced this pull request Aug 29, 2018
dg pushed a commit that referenced this pull request Aug 29, 2018
dg pushed a commit that referenced this pull request Aug 29, 2018
dg pushed a commit that referenced this pull request Aug 29, 2018
…m declared both final and abstract [BC break] (#36)
dg pushed a commit that referenced this pull request Aug 29, 2018
…m declared both final and abstract [BC break] (#36)
dg pushed a commit that referenced this pull request Aug 29, 2018
…m declared both final and abstract [BC break] (#36)
dg pushed a commit that referenced this pull request Aug 29, 2018
…m declared both final and abstract [BC break] (#36)
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