U/LC: use error(...), not error { }

Otherwise, the message would be: () -> String

Also, add more information to the error message

^KT-47777 Fixed
This commit is contained in:
Jinseong Jeon
2022-06-15 11:53:56 -07:00
committed by Ilya Kirillov
parent 9e9f26024b
commit cd80bddfcd
@@ -245,7 +245,7 @@ open class KtLightClassForFacadeImpl constructor(
return LightClassGenerationSupport.getInstance(project).run {
if (useUltraLightClasses) createUltraLightClassForFacade(manager, fqName, stubValue, sources)
?: error { "Unable to create UL class for facade" }
?: error("Unable to create UL class for facade: $fqName for ${sources.joinToString { it.virtualFilePath }}")
else KtLightClassForFacadeImpl(manager, fqName, stubValue, sources)
}
}