Downgrade assert to warning

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

View File

@@ -417,8 +417,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)
}