Consider this Java class:
package testserializable;
import java.io.Serializable;
public class MyClass {
private Serializable id;
public Serializable getId() {
return id;
}
public void setId(Serializable id) {
this.id = id;
}
}
and this Groovy class:
package testserializable
import groovy.transform.CompileStatic
@CompileStatic
class TestSerializable {
void foo() {
def c = new MyClass(id: -1)
}
}
An error is shown in the editor:
Groovy:[Static type checking] - Cannot assign value of type int to variable of type java.io.Serializable
Same problem if I do:
def c = new MyClass()
c.id = -1
Fixed if I do: -1 as Integer.
This is a regression for sure, but I don't know when it started to appear.
Using Greclipse 4.7.0.v202208210205-e2112.
Consider this Java class:
and this Groovy class:
An error is shown in the editor:
Same problem if I do:
Fixed if I do:
-1 as Integer.This is a regression for sure, but I don't know when it started to appear.
Using Greclipse 4.7.0.v202208210205-e2112.