File tree 1 file changed +4
-4
lines changed
compiler/src/dotty/tools/dotc/core
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2174,18 +2174,18 @@ object SymDenotations {
2174
2174
if youngest.size > 1 then
2175
2175
throw TypeError (i """ ${ambiguousFilesMsg(youngest.tail.head)}
2176
2176
|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
2179
2177
2180
2178
// Warn if one of the older files comes from a different container.
2181
2179
// In that case picking the youngest file is not necessarily what we want,
2182
2180
// since the older file might have been loaded from a jar earlier in the
2183
2181
// classpath.
2182
+ def sameContainer (f : AbstractFile ): Boolean =
2183
+ try f.container == chosen.container catch case NonFatal (ex) => true
2184
2184
if ! ambiguityWarningIssued then
2185
2185
for conflicting <- assocFiles.find(! sameContainer(_)) do
2186
- ctx.warning(i """ ${ambiguousFilesMsg(youngest.tail.head )}
2186
+ ctx.warning(i """ ${ambiguousFilesMsg(conflicting )}
2187
2187
|Keeping only the definition in $chosen""" )
2188
- ambiguityWarningIssued = true
2188
+ ambiguityWarningIssued = true
2189
2189
multi.filterWithPredicate(_.symbol.associatedFile == chosen)
2190
2190
end dropStale
2191
2191
You can’t perform that action at this time.
0 commit comments