This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.codehaus.groovy.ast.expr.* | |
incompatibleAssignment { lhsType, rhsType, expr -> | |
if (!(expr instanceof DeclarationExpression)) return | |
Expression orig = expr.rightExpression | |
def ce = new CastExpression(lhsType, orig) | |
ce.coerce = true | |
expr.setRightExpression(ce) | |
storeType(expr, lhsType) | |
handled = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab('org.scala-stm:scala-stm_2.10:0.7') | |
import scala.concurrent.stm.TxnUnknown$ | |
import static scala.concurrent.stm.japi.STM.* | |
import static scala.concurrent.stm.Txn.* | |
void retry() { | |
def txn = findCurrent(TxnUnknown$.MODULE$).get() | |
retry(txn) | |
} |
NewerOlder