@patapon Generally, if you're looking for some compiler part that reports error/warning, then it's quite easy to find it:
- Start with class
org.jetbrains.kotlin.diagnostics.Errors
, and look for that particular diagnostic (in your case, it's a
CONFLICITNG_OVERLOADS
).
- Then, find its usages and check where it is reported. You're looking for calls to
BindingTrace.report(SOME_DIAGNOSTIC_FACTORY_FROM_ERRORS.on(...))
.
Again, in your case there are some not-so-relevant usages, e.g. in
LocalRedeclarationChecker
, and the main one is in the
OverloadResolved.kt
, which is the answer to your question.