Skip to content

Drop with after class #11448

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

Merged
merged 1 commit into from
Feb 18, 2021
Merged

Drop with after class #11448

merged 1 commit into from
Feb 18, 2021

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Feb 17, 2021

Disallow with after class. It was still allowed before by accident since
the relevant code slipped through a revert commit.

Disallow `with` after class. It was still allowed before by accident since
the relevant code slipped through a revert commit.
Copy link
Member

@bishabosha bishabosha left a comment

Choose a reason for hiding this comment

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

Approve - all the following were rejected, as expected:

class Foo with
  def foo = 23

trait Bar with
  def bar = 23

enum Baz with
  case A, B, C

object Qux with
  def qux = 23

def nested = {
  object Nested with
    def quxx = 47
}

@bishabosha bishabosha merged commit c50d341 into scala:master Feb 18, 2021
@bishabosha bishabosha deleted the fix-11441 branch February 18, 2021 11:19
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
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.

Disallow with in place of : to start a template Remove with after class to open template body
3 participants