Skip to content

Add RepeatedAnnot to Reflection.defn #9428

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1935,6 +1935,7 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend
def Definitions_Array_update: Symbol = defn.Array_update.asTerm

def Definitions_RepeatedParamClass: Symbol = defn.RepeatedParamClass
def Definitions_RepeatedAnnot: Symbol = defn.RepeatedAnnot

def Definitions_OptionClass: Symbol = defn.OptionClass
def Definitions_NoneModule: Symbol = defn.NoneModule
Expand Down
3 changes: 3 additions & 0 deletions library/src/scala/tasty/Reflection.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2650,6 +2650,9 @@ class Reflection(private[scala] val internal: CompilerInterface) { self =>
*/
def RepeatedParamClass: Symbol = internal.Definitions_RepeatedParamClass

/** The class symbol of class `scala.annotation.internal.Repeated` */
def RepeatedAnnot: Symbol = internal.Definitions_RepeatedAnnot

/** The class symbol of class `scala.Option`. */
def OptionClass: Symbol = internal.Definitions_OptionClass

Expand Down
6 changes: 6 additions & 0 deletions library/src/scala/tasty/reflect/CompilerInterface.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1478,8 +1478,14 @@ trait CompilerInterface {
def Definitions_Array_length: Symbol
def Definitions_Array_update: Symbol

/** A dummy class symbol that is used to indicate repeated parameters
* compiled by the Scala compiler.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we clarify this or make an issue to clarify this in the future? Does this comment want to convey that this class is only used for Scalac repeated parameters?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I copied the original comment to the interface. We can revise this documentation later.

Copy link
Contributor

Choose a reason for hiding this comment

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

So can we make an issue for it? Or are you keeping track of such things in a different way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will need to do a pass over everything in the API and probably rewrite/improve most of the documentation. Singling a few out does not seem to be worth it.

*/
def Definitions_RepeatedParamClass: Symbol

/** The class symbol of class `scala.annotation.internal.Repeated` */
def Definitions_RepeatedAnnot: Symbol

def Definitions_OptionClass: Symbol
def Definitions_NoneModule: Symbol
def Definitions_SomeModule: Symbol
Expand Down