stg-tud/tigerseyeplugin — Issue #36: DSLInvoker method call on Superclass creates second object
Author: leoroos
Created: 2011-12-19 21:16:33+00:00
State: open
Labels: Core, defect

The DSLInvoker associates the local language object with its class as key to access the object.
For example the method doSpecialTrick() of a class SpecificLogoDSL will be called like that

DSLInvoker.getDSL(SpecificLogoDSL.class).doSpecialTrick()

If a method on that language object is called that has been implemented by a super class
the Invoker will take the superclass as the key to a new language object on which he executes
the called method. Say the generic left() method is implemented in SpecificLogoDSL's Parent LogoDSL the code

left
doSpecialTrick

will be translated to

DSLInvoker.getDSL(LogoDSL.class).left()
DSLInvoker.getDSL(SpecificLogoDSL.class).doSpecialTrick()

The expected result would be that both method calls are executed on the same object, so that the
Logo turtle first performs a left and then the specialTrick. But the result will be that two turtles are created
one performs the left and one the specialTrick.