Skip to content

Commit

Permalink
Merge pull request #904 from sschaef/t1002388-race-condition
Browse files Browse the repository at this point in the history
Prevent race condition in CallByNameParamAtCreationPresenter
  • Loading branch information
dragos committed Feb 26, 2015
2 parents 74a8d1b + 141cd0a commit bf151ce
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,16 @@ object CallByNameParamAtCreationPresenter extends HasLogger {
* This should cover partially applied functions referencing by-name-params (see #1002381).
*/
def referencesByNameParam(param: compiler.Symbol) = {
import org.scalaide.core.compiler.IScalaPresentationCompiler.Implicits.RichResponse
if (!param.hasRawInfo) {
false
} else {
param.rawInfo.typeSymbol match {
case cs: compiler.ClassSymbol => cs.name == compiler.tpnme.BYNAME_PARAM_CLASS_NAME
case _ => false
}
compiler.asyncExec {
param.rawInfo.typeSymbol match {
case cs: compiler.ClassSymbol => cs.name == compiler.tpnme.BYNAME_PARAM_CLASS_NAME
case _ => false
}
}.getOrElse(false)()
}
}

Expand Down

0 comments on commit bf151ce

Please sign in to comment.