Closed
Description
In some places of Scaladoc we need to cast members of public API into compiler API to get more information. We can try to expose necessary elements of compiler API in public API to minimize casting.
Things missing in public API:
-
TypeRepr.isTupleType
(see Add TypeRepr.isTupleN to reflection API #13384) -
Position.exists
-
TypeRepr.isCompiletimeAppliedType
-
TypeRepr.memberInfo(sym: Symbol)
<- equivalent ofType.memberInfo(sym: Symbol)
- Method which returns all supertypes of class
- Method which returns all members of Symbol
- Method which returns TypeRepr of ClassDef
There are also some fishy pieces of code that should probably be removed:
- We need to filter out some methods by matching Strings:
s.name.contains("$super$")
,".*\\$default\\$\\d+$".r.matches(s.name)
. There's no flags set to filter these methods, maybe we should add Synthetic flag or expose some API to be able to filter them out. - There's currently no way to disambiguate constructor with empty param list and constructor without param list: for
DefDef.paramss
both returnList(List())
. Currently we hack this check using positions.
It's probably a good time to do the changes now to add them to 3.1.0.