File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
compiler/src/dotty/tools/dotc/plugins Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -143,18 +143,16 @@ object Plugin {
143143 }
144144
145145 val seen = mutable.HashSet [String ]()
146- val enabled = (fromPaths ::: fromDirs) map {
147- case Success (( pd, loader) ) if seen(pd.classname) =>
146+ val enabled = (fromPaths ::: fromDirs) map(_.flatMap {
147+ case ( pd, loader) if seen(pd.classname) =>
148148 // a nod to scala/bug#7494, take the plugin classes distinctly
149149 Failure (new PluginLoadException (pd.name, s " Ignoring duplicate plugin ${pd.name} ( ${pd.classname}) " ))
150- case Success (( pd, loader) ) if ignoring contains pd.name =>
150+ case ( pd, loader) if ignoring contains pd.name =>
151151 Failure (new PluginLoadException (pd.name, s " Disabling plugin ${pd.name}" ))
152- case Success (( pd, loader) ) =>
152+ case ( pd, loader) =>
153153 seen += pd.classname
154154 Plugin .load(pd.classname, loader)
155- case Failure (e) =>
156- Failure (e)
157- }
155+ })
158156 enabled // distinct and not disabled
159157 }
160158
You can’t perform that action at this time.
0 commit comments