File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2174,18 +2174,18 @@ object SymDenotations {
21742174 if youngest.size > 1 then
21752175 throw TypeError (i """ ${ambiguousFilesMsg(youngest.tail.head)}
21762176 |One of these files should be removed from the classpath. """ )
2177- def sameContainer (f : AbstractFile ): Boolean =
2178- try f.container == chosen.container catch case NonFatal (ex) => true
21792177
21802178 // Warn if one of the older files comes from a different container.
21812179 // In that case picking the youngest file is not necessarily what we want,
21822180 // since the older file might have been loaded from a jar earlier in the
21832181 // classpath.
2182+ def sameContainer (f : AbstractFile ): Boolean =
2183+ try f.container == chosen.container catch case NonFatal (ex) => true
21842184 if ! ambiguityWarningIssued then
21852185 for conflicting <- assocFiles.find(! sameContainer(_)) do
2186- ctx.warning(i """ ${ambiguousFilesMsg(youngest.tail.head )}
2186+ ctx.warning(i """ ${ambiguousFilesMsg(conflicting )}
21872187 |Keeping only the definition in $chosen""" )
2188- ambiguityWarningIssued = true
2188+ ambiguityWarningIssued = true
21892189 multi.filterWithPredicate(_.symbol.associatedFile == chosen)
21902190 end dropStale
21912191
You can’t perform that action at this time.
0 commit comments