Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Scalastyle doesn't support 2.13's singleton types #141

@MateuszKubuszok

Description

@MateuszKubuszok

In Scala 2.13 singleton types are supported. They are useful e.g. in combination with Refined Types:

@newtype final case class Email(emailString: String Refined MatchesRegex[Email.Pattern])
object Email {
  type Pattern = "(.+)@(.+)"
  ...
}

however even in 1.5 Scalastyle doesn't handle such input:

[error] /path/to/my/file.scala: Expected identifier, but got Token(STRING_LITERAL,"(.+)@(.+)",1054,"(.+)@(.+)")

Would it be possible to add such support?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions