Skip to content

New scheme for implicit classes that can be top level  #286

Open
@adriaanm

Description

@adriaanm

Suggested by @retronym on Scala-user

[...] scheme to encode the implicit modifier into the name of a some class. For instance, we could do something like:

implicit class RichString(val s: String) {
   /*synthetic*/ class Implicit$ // added by the compiler
}

There is precedent for adding synthetic inner classes (e.g javac does to add to the signatures of "access constructors": https://gist.github.com/retronym/8ca8026f5b7eb981b53f5c8923d50f54)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions