|
Groovy example source code file (AssignmentInsideExpressionBug.groovy)
The Groovy AssignmentInsideExpressionBug.groovy source codepackage groovy.bugs /** * @version $Revision: 4996 $ */ class AssignmentInsideExpressionBug extends GroovyTestCase { void testBug() { def x if ((x = someMethod()) != null) { println x } def y if ((y = getFoo()) > 5) { println "y is greater than 5" } def a = 123, b = 123 assert a == 123 assert b == 123 } def someMethod() { return "worked!" } def getFoo() { return 7 } } Other Groovy examples (source code examples)Here is a short list of links related to this Groovy AssignmentInsideExpressionBug.groovy source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.