Extract type parameter bounds

This commit is contained in:
Chris Smowton
2022-01-31 16:13:15 +00:00
committed by Ian Lynagh
parent ec5bc8dad5
commit 8bb23651ae
4 changed files with 31 additions and 1 deletions

View File

@@ -151,7 +151,13 @@ open class KotlinFileExtractor(
val locId = tw.getLocation(tp)
tw.writeHasLocation(id, locId)
// todo: add type bounds
tp.superTypes.forEachIndexed { boundIdx, bound ->
if(!(bound.isAny() || bound.isNullableAny())) {
tw.getLabelFor<DbTypebound>("@\"bound;$boundIdx;{$id}\"") {
tw.writeTypeBounds(it, useType(bound).javaResult.id as Label<out DbReftype>, boundIdx, id)
}
}
}
return id
}