Skip to content

Commit 9479b02

Browse files
committed
working around unloaded flags for some classfile symbols
1 parent 1cdbc45 commit 9479b02

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

commons-macros/src/main/scala/com/avsystem/commons/macros/MacroCommons.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,8 +823,10 @@ trait MacroCommons { bundle =>
823823
case t => t
824824
}
825825

826-
def isSealedHierarchyRoot(sym: Symbol): Boolean =
826+
def isSealedHierarchyRoot(sym: Symbol): Boolean = {
827+
sym.info // force loading of type information, sometimes it may be missing when loading from classfile
827828
sym.isClass && sym.isAbstract && sym.asClass.isSealed
829+
}
828830

829831
def knownNonAbstractSubclasses(sym: Symbol): Set[Symbol] =
830832
sym.asClass.knownDirectSubclasses.flatMap { s =>

0 commit comments

Comments
 (0)