Downgrade assert to warning

This commit is contained in:
Chris Smowton
2021-12-06 17:28:58 +00:00
committed by Ian Lynagh
parent 2f8b8fadc3
commit cfb839ac91

View File

@@ -409,8 +409,8 @@ open class KotlinFileExtractor(
tw.writeHasLocation(id, locId)
val body = f.body
if(body != null && extractBody) {
// Type substitution should only be used to extract a prototype, not the body as well:
assert(typeSubstitutionMap == null)
if(typeSubstitutionMap != null)
logger.warnElement(Severity.ErrorSevere, "Type substitution should only be used to extract a function prototype, not the body", f)
extractBody(body, id)
}