I hereby claim:
- I am paulk-asert on github.
- I am paulk_asert (https://keybase.io/paulk_asert) on keybase.
- I have a public key whose fingerprint is CBCC A1D2 E040 C571 9368 5C76 976A 7A21 D768 D38B
To claim this, I am signing this object:
@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) | |
} |
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 |
import groovy.transform.TypeChecked | |
interface ReadOnlyCollection { | |
boolean contains(Object o) | |
boolean isEmpty() | |
} | |
@TypeChecked(extensions='StructuralProvider.groovy') | |
def method() { | |
def list = ['cat', 'dog'] |
@groovy.transform.TypeChecked | |
def myMethod() { | |
def s = 'The 3 quick\nbrown 4 fox' | |
def expected = 'The _ QUICK|brown _ FOX|' | |
def result = '' | |
new StringReader(s).splitEachLine(~/\d/){ result += "${it[0]}_${it[1].toUpperCase()}|" } | |
assert result == expected; result = '' | |
new StringReader(s).splitEachLine(~/\d/){ parts -> result += "${parts[0]}_${parts[1].toUpperCase()}|" } | |
assert result == expected; result = '' | |
new StringReader(s).splitEachLine(~/\d/){ List parts -> result += "${parts[0]}_${parts[1].toUpperCase()}|" } |
Index: src/main/org/codehaus/groovy/runtime/IOGroovyMethods.java | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>windows-1252 | |
=================================================================== | |
--- src/main/org/codehaus/groovy/runtime/IOGroovyMethods.java (revision 03d9c2673947d44cd01cf1e3ec5bf32459e0b39c) | |
+++ src/main/org/codehaus/groovy/runtime/IOGroovyMethods.java (revision ) | |
@@ -25,6 +25,7 @@ | |
import groovy.transform.stc.ClosureParams; | |
import groovy.transform.stc.FirstParam; |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object: