Skip to content

Expose methods used by Scaladoc in Quotes API #13382

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

Closed
wants to merge 1 commit into from

Conversation

pikinier20
Copy link
Contributor

@pikinier20 pikinier20 commented Aug 25, 2021

closes #13371

Probably needs to write some documentation to added API

Comment on lines 3670 to 3672
/** Type member directly declared in the class */
def typeMembers: List[Symbol]

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 see there some inconsistency as methodMembers and fieldMembers return both declared and inherited members and typeMembers returns only declared members.

Copy link
Contributor

@Kordyjan Kordyjan left a comment

Choose a reason for hiding this comment

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

Please update the MiMaFilters

@bishabosha bishabosha added this to the 3.1.0 milestone Aug 25, 2021
@nicolasstucki nicolasstucki self-assigned this Aug 25, 2021
@nicolasstucki
Copy link
Contributor

It would be good to split this PR into smaller parts that add or change specific parts of the API

@nicolasstucki
Copy link
Contributor

We need to split this into a PR with for each method or group of methods. We also need to include tests, using it in the docs is not enough as at some point we might change that code and stop using those methods. We can parallelize a bit this effort.

Copy link
Contributor

@nicolasstucki nicolasstucki left a comment

Choose a reason for hiding this comment

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

Needs split

@nicolasstucki
Copy link
Contributor

nicolasstucki commented Aug 26, 2021

@pikinier20 you should create branches on https://github.com/dotty-staging/dotty, this way we all have access to these branches and it is easier to collaborate.

@nicolasstucki
Copy link
Contributor

II started with isTupleType in #13384

@@ -2733,6 +2752,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
def sourceCode: Option[String] =
// TODO detect when we do not have a source and return None
Some(new String(self.source.content(), self.start, self.end - self.start))
def exists: Boolean = self.exists
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe all positions should exist. If one does not we should figure out why it is not set.

@@ -246,6 +246,13 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
optional(self.rhs.asInstanceOf[tpd.Template].self)
def body: List[Statement] =
self.rhs.asInstanceOf[tpd.Template].body
def tpe: TypeRepr =
self.symbol.typeRef.appliedTo(self.symbol.typeParams.map(_.typeRef))
Copy link
Contributor

Choose a reason for hiding this comment

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

Applying this type to the types refs of the parameter symbol seems wrong. Not sure what the resulting type represents.

@nicolasstucki nicolasstucki removed this from the 3.1.0 milestone Aug 26, 2021
@pikinier20
Copy link
Contributor Author

I've split this PR into smaller parts

@pikinier20 pikinier20 closed this Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scaladoc: Minimize casting between public and compiler API
5 participants