Skip to content

Commit 136c743

Browse files
authored
Merge pull request scala#7154 from xuwei-k/Either-Projection
fix Either Projection warnings
2 parents c3f1d57 + cc815da commit 136c743

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/compiler/scala/tools/nsc/backend/jvm/opt/ClosureOptimizer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ abstract class ClosureOptimizer {
177177
case _ => Right(prodCons.frameAt(invocation).getStackSize)
178178
}
179179

180-
stackSize.right.map((invocation, _))
180+
stackSize.map((invocation, _))
181181
}).toList
182182
}
183183

src/compiler/scala/tools/nsc/backend/jvm/opt/InlinerHeuristics.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ abstract class InlinerHeuristics extends PerRunInit {
166166
postCall.flatMap(call => {
167167
callGraph.addIfMissing(callee.callee, callee.calleeDeclarationClass)
168168
val maybeCallsite = callGraph.findCallSite(callee.callee, call)
169-
maybeCallsite.flatMap(requestIfCanInline(_, reason).flatMap(_.right.toOption))
169+
maybeCallsite.flatMap(requestIfCanInline(_, reason).flatMap(_.toOption))
170170
}).toList
171171
}
172172
Some(Right(InlineRequest(callsite, postInlineRequest, reason)))

src/interactive/scala/tools/nsc/interactive/Main.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ object Main extends nsc.MainClass {
2121
val reloaded = new interactive.Response[Unit]
2222
compiler.askReload(sfs, reloaded)
2323

24-
reloaded.get.right.toOption match {
24+
reloaded.get.toOption match {
2525
case Some(ex) => reporter.ERROR.count += 1 // Causes exit code to be non-0
2626
case None => reporter.reset() // Causes other compiler errors to be ignored
2727
}

0 commit comments

Comments
 (0)