Skip to content

Commit 2a0ab6f

Browse files
committed
Account for stable constrictors in ExtractAPI
Constructors (and potentially, in the future, other methods) can have the stable flag set. We need to adapt ExtractAPI to this change.
1 parent e42acaa commit 2a0ab6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
328328
} else if (sym.is(Mutable, butNot = Accessor)) {
329329
api.Var.of(sym.name.toString, apiAccess(sym), apiModifiers(sym),
330330
apiAnnotations(sym).toArray, apiType(sym.info))
331-
} else if (sym.isStable) {
331+
} else if (sym.isStable && !sym.isRealMethod) {
332332
api.Val.of(sym.name.toString, apiAccess(sym), apiModifiers(sym),
333333
apiAnnotations(sym).toArray, apiType(sym.info))
334334
} else {

0 commit comments

Comments
 (0)