Skip to content

Add ClassDef.baseTypes to reflection API #13398

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

No description provided.

@pikinier20 pikinier20 force-pushed the add-supertypes branch 2 times, most recently from a474421 to 5409db1 Compare August 26, 2021 14:58
@pikinier20 pikinier20 changed the title Add ClassDef.supertypes to reflection API Add ClassDef.baseTypes to reflection API Aug 26, 2021
@nicolasstucki
Copy link
Contributor

Part of #13371

@@ -79,6 +79,7 @@ trait ClassLikeSupport:
else Seq(link -> superLink) ++ getSupertypesGraph(superLink, nextTo)
}

// TODO use classDef.baseTypes
Copy link
Contributor

Choose a reason for hiding this comment

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

@pikinier20 SInce you created this PR the code below changed. Is this method still relevant or is Symbol.baseCalsses enough?

@@ -0,0 +1,3 @@
List(scala.Int, scala.AnyVal, scala.Matchable, scala.Any)
List(java.lang.Object, scala.Matchable, scala.Any)
List(scala.Some[Some.this.A], scala.Option[Some.this.A], java.io.Serializable, scala.Product, scala.Equals, scala.collection.IterableOnce[Some.this.A], java.lang.Object, scala.Matchable, scala.Any)
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding this test I noticed that baseTypes is losing the type parameters. It might need to be implemented on TypeRepr directly.

@pikinier20
Copy link
Contributor Author

The problem was solved by #14892

@pikinier20 pikinier20 closed this Apr 25, 2022
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.

4 participants