File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -249,18 +249,16 @@ object Contexts {
249249 def getSource (path : TermName ): SourceFile = base.sourceNamed.get(path) match {
250250 case Some (source) =>
251251 source
252- case None =>
253- val src = try {
254- val f = new PlainFile (Path (path.toString))
255- val s = getSource(f)
256- base.sourceNamed(path) = s
257- s
258- } catch {
259- case ex : InvalidPathException =>
260- ctx.error(s " invalid file path: ${ex.getMessage}" )
261- NoSource
262- }
252+ case None => try {
253+ val f = new PlainFile (Path (path.toString))
254+ val src = getSource(f)
255+ base.sourceNamed(path) = src
263256 src
257+ } catch {
258+ case ex : InvalidPathException =>
259+ ctx.error(s " invalid file path: ${ex.getMessage}" )
260+ NoSource
261+ }
264262 }
265263
266264 /** Sourcefile with given path, memoized */
You can’t perform that action at this time.
0 commit comments