Details
Description
ScriptBytecodeAdapter.getFieldOnSuper calls MetaClass#getAttribute(SuperType,thisObject,"fieldName",true).
MetaClassImpl delegates and drops the super flag in the process.
class A { public x = 'A' } class B extends A { public x = 'B' } def a = new A() println a.metaClass.getAttribute(A, a, 'x', false) // prints "A" def b = new B() println b.metaClass.getAttribute(B, b, 'x', false) // prints "B" println b.metaClass.getAttribute(A, b, 'x', true) // prints "B", but "A" is expected println ScriptBytecodeAdapter.getFieldOnSuper(A, b, 'x') // prints "B", but "A" is expected