Groovy脚本引发错误:
def a = "test"
+ "test"
+ "test"
Run Code Online (Sandbox Code Playgroud)
错误:
No signature of method: java.lang.String.positive() is
applicable for argument types: () values: []
Run Code Online (Sandbox Code Playgroud)
虽然这个脚本工作正常:
def a = new String(
"test"
+ "test"
+ "test"
)
Run Code Online (Sandbox Code Playgroud)
为什么?