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 3444 1E50 4A93 7F43 EB0D AEF9 6A65 176A 0FB1 CD0B
To claim this, I am signing this object:
import java.util.List; | |
sealed interface ListState {} | |
interface Empty extends ListState { } | |
interface NonEmpty extends ListState { } | |
class MyList<ListStatus,E> { | |
public List<E> getDelegate() { | |
return delegate; | |
} |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
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; |
@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()}|" } |
import groovy.transform.TypeChecked | |
interface ReadOnlyCollection { | |
boolean contains(Object o) | |
boolean isEmpty() | |
} | |
@TypeChecked(extensions='StructuralProvider.groovy') | |
def method() { | |
def list = ['cat', 'dog'] |
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 |