Skip to content

Commit 2a8fcb8

Browse files
committed
Cleanup comments
1 parent 5ba81a5 commit 2a8fcb8

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

scaladoc/src/dotty/tools/scaladoc/tasty/ClassLikeSupport.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@ trait ClassLikeSupport:
113113
Inkuire.db = Inkuire.db.copy(types = Inkuire.db.types.updated(t.itid.get, (t, Seq.empty)))
114114
}
115115

116-
classDef
117-
.symbol
118-
.declaredMethods
116+
classDef.symbol.declaredMethods
119117
.filter { (s: Symbol) =>
120118
!s.flags.is(Flags.Private) &&
121119
!s.flags.is(Flags.Protected) &&
@@ -133,6 +131,7 @@ trait ClassLikeSupport:
133131
from match
134132
case Some(from) => Inkuire.db = Inkuire.db.copy(implicitConversions = Inkuire.db.implicitConversions :+ (from.itid.get -> to))
135133
case None =>
134+
136135
case methodSymbol: Symbol =>
137136
val defdef = methodSymbol.tree.asInstanceOf[DefDef]
138137
val methodVars = defdef.paramss.flatMap(_.params).collect {
@@ -152,7 +151,7 @@ trait ClassLikeSupport:
152151
result = defdef.returnTpt.asInkuire(vars, false),
153152
context = Inkuire.SignatureContext(
154153
vars = vars.toSet,
155-
constraints = Map.empty //TODO for future
154+
constraints = Map.empty //TODO [Inkuire] Type bounds
156155
)
157156
),
158157
name = methodSymbol.name,

scaladoc/src/dotty/tools/scaladoc/tasty/InkuireSupport.scala

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ trait InkuireSupport:
2626
partialAsInkuire(vars, isVariable)(tpeTree)
2727

2828
def partialAsInkuire(vars: Set[String], isVariable: Boolean): PartialFunction[Tree, Inkuire.Type] = {
29-
case TypeBoundsTree(low, high) => inner(low.tpe, vars) //TODO
29+
case TypeBoundsTree(low, high) => inner(low.tpe, vars) //TODO [Inkuire] Type bounds
3030
case tpeTree: Applied =>
3131
inner(tpeTree.tpe, vars).copy(
32-
params = tpeTree.args.map(p => Inkuire.Invariance(p.asInkuire(vars, isVariable))) //TODO check variance
32+
params = tpeTree.args.map(p => Inkuire.Invariance(p.asInkuire(vars, isVariable)))
3333
)
3434
case tpeTree: TypeTree =>
3535
inner(tpeTree.tpe, vars)
@@ -65,7 +65,7 @@ trait InkuireSupport:
6565
name = Inkuire.TypeName(normalizedName),
6666
itid = argument.symbol.itid,
6767
isVariable = vars.contains(normalizedName) || isVariable,
68-
params = Seq.empty //TODO in future arities of params will be needed
68+
params = Seq.empty //TODO [Inkuire] Type Lambdas
6969
)
7070
if argument.symbol.flags.is(Flags.Covariant) then Inkuire.Covariance(t)
7171
else if argument.symbol.flags.is(Flags.Contravariant) then Inkuire.Contravariance(t)
@@ -86,8 +86,8 @@ trait InkuireSupport:
8686
case _ => false
8787

8888
private def inner(tp: TypeRepr, vars: Set[String]): Inkuire.Type = tp match
89-
case OrType(left, right) => inner(left, vars) //TODO for future
90-
case AndType(left, right) => inner(left, vars) //TODO for future
89+
case OrType(left, right) => inner(left, vars) //TODO [Inkuire] Or/AndTypes
90+
case AndType(left, right) => inner(left, vars) //TODO [Inkuire] Or/AndTypes
9191
case ByNameType(tpe) => inner(tpe, vars)
9292
case ConstantType(constant) =>
9393
Inkuire.Type(
@@ -97,15 +97,15 @@ trait InkuireSupport:
9797
)
9898
case ThisType(tpe) => inner(tpe, vars)
9999
case AnnotatedType(AppliedType(_, Seq(tpe)), annotation) if isRepeatedAnnotation(annotation) =>
100-
inner(tpe, vars) //TODO for future
100+
inner(tpe, vars) //TODO [Inkuire] Repeated types
101101
case AppliedType(repeatedClass, Seq(tpe)) if isRepeated(repeatedClass) =>
102-
inner(tpe, vars) //TODO for future
102+
inner(tpe, vars) //TODO [Inkuire] Repeated types
103103
case AnnotatedType(tpe, _) =>
104104
inner(tpe, vars)
105105
case tl @ TypeLambda(params, paramBounds, resType) =>
106-
inner(resType, vars) //TODO for future
106+
inner(resType, vars) //TODO [Inkuire] Type lambdas
107107
case r: Refinement =>
108-
inner(r.info, vars) //TODO for future
108+
inner(r.info, vars) //TODO [Inkuire] Refinements
109109
case t @ AppliedType(tpe, typeList) =>
110110
import dotty.tools.dotc.util.Chars._
111111
if t.isFunctionType then
@@ -125,7 +125,7 @@ trait InkuireSupport:
125125
else
126126
inner(tpe, vars).copy(
127127
params = typeList.map(p => Inkuire.Invariance(inner(p, vars)))
128-
) //TODO check if it's ok (Having resolver should mean that variance here isn't meaningful)
128+
)
129129
case tp: TypeRef =>
130130
Inkuire.Type(
131131
name = Inkuire.TypeName(tp.name),
@@ -136,20 +136,20 @@ trait InkuireSupport:
136136
case tr @ TermRef(qual, typeName) =>
137137
inner(qual, vars)
138138
case TypeBounds(low, hi) =>
139-
inner(low, vars) //TODO for future
139+
inner(low, vars) //TODO [Inkuire] Type bounds
140140
case NoPrefix() =>
141-
Inkuire.Type.unresolved //TODO check <- should be handled by Singleton case, but doesn't work
141+
Inkuire.Type.unresolved //TODO [Inkuire] <- should be handled by Singleton case, but didn't work
142142
case MatchType(bond, sc, cases) =>
143143
inner(sc, vars)
144144
case ParamRef(TypeLambda(names, _, resType), i) =>
145145
Inkuire.Type(
146146
name = Inkuire.TypeName(names(i)),
147-
itid = Some(Inkuire.ITID(s"external-itid-${names(i)}", isParsed = false)), //TODO check if it's possible to get the actual ITID(DRI)
147+
itid = Some(Inkuire.ITID(s"external-itid-${names(i)}", isParsed = false)),
148148
isVariable = true
149149
)
150150
case ParamRef(m: MethodType, i) =>
151151
inner(m.paramTypes(i), vars)
152152
case RecursiveType(tp) =>
153153
inner(tp, vars)
154154
case MethodType(_, params, resType) =>
155-
inner(resType, vars) //TODO for future
155+
inner(resType, vars) //TODO [Inkuire] Method type

0 commit comments

Comments
 (0)