Sort sealed class inheritors to ensure reproducible builds with IC
without this sorting the inheritors field in the metadata may depend on whether some inheritors are compiled in the IC round or not.
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@ fun FirRegularClass.getSealedClassInheritors(session: FirSession): List<ClassId>
|
||||
@OptIn(SealedClassInheritorsProviderInternals::class)
|
||||
fun FirRegularClass.setSealedClassInheritors(inheritors: List<ClassId>) {
|
||||
require(this.isSealed)
|
||||
sealedInheritorsAttr = inheritors
|
||||
sealedInheritorsAttr = inheritors.sortedBy { it.asFqNameString() }
|
||||
}
|
||||
|
||||
private object SealedClassInheritorsKey : FirDeclarationDataKey()
|
||||
|
||||
Reference in New Issue
Block a user