fix KT-9733 No error shown for 2 "main" functions in the same file

#KT-9733 Fixed
This commit is contained in:
Michael Nedzelsky
2015-10-26 14:53:26 +03:00
parent 31bff24c55
commit 63f84fc60e
5 changed files with 29 additions and 9 deletions
@@ -70,9 +70,6 @@ class BuilderFactoryForDuplicateSignatureDiagnostics(
for (origin in data.signatureOrigins) {
var element = origin.element
// TODO Remove this code after dropping package facades
if (element is KtNamedFunction && mainFunctionDetector.isMain(element) && !element.isInsideJvmMultifileClassFile()) return
if (element == null || origin.originKind in EXTERNAL_SOURCES_KINDS) {
element = data.classOrigin.element
}