File tree Expand file tree Collapse file tree
main/java/org/codehaus/groovy/classgen
test/groovy/gls/innerClass Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1457,13 +1457,8 @@ public void visitVariableExpression(final VariableExpression expression) {
14571457 } else {
14581458 PropertyExpression pexp = thisPropX (/*implicit-this*/ true , expression .getName ());
14591459 pexp .getProperty ().setSourcePosition (expression );
1460- pexp .setType (expression .getType ());
14611460 pexp .copyNodeMetaData (expression );
14621461 pexp .visit (this );
1463-
1464- if (!compileStack .isLHS () && !expression .isDynamicTyped ()) {
1465- controller .getOperandStack ().doGroovyCast (typeOf (expression ));
1466- }
14671462 }
14681463
14691464 if (!compileStack .isLHS ()) {
Original file line number Diff line number Diff line change @@ -2439,9 +2439,33 @@ final class InnerClassTest {
24392439 '''
24402440 }
24412441
2442- // GROOVY-9618
2442+ // GROOVY-11875
24432443 @Test
24442444 void testNestedPropertyHandling6 () {
2445+ assertScript ''' import java.util.concurrent.atomic.AtomicBoolean
2446+ class Outer {
2447+ private AtomicBoolean foo = [true]
2448+ boolean isFoo() {
2449+ foo.get()
2450+ }
2451+ Boolean bar() {
2452+ def i = new Inner()
2453+ i.baz()
2454+ }
2455+ class Inner {
2456+ def baz() {
2457+ foo
2458+ }
2459+ }
2460+ }
2461+
2462+ assert new Outer().bar()
2463+ '''
2464+ }
2465+
2466+ // GROOVY-9618
2467+ @Test
2468+ void testNestedPropertyHandling7 () {
24452469 assertScript '''
24462470 class Super {
24472471 public static X = 1
You can’t perform that action at this time.
0 commit comments