Calling a refined method within the body of the new method

Issue #58 new
Jesper Öqvist created an issue

Click here to view original trac ticket.

The syntax for calling a refined method from within the body of a new method is very brittle. The current standard syntax is to use the implicit "refined" method. All occurrences of the string "refined" are replaced by JastAdd2 with the correct method name for the refined method.

This is unsafe due to the fact that any occurrence of the string is replaced - even inside comments or string literals.

This also prevents the programmer from calling a method named "refined" from within a refined method declaration.

The same problem exists with the legacy refine syntax (enabled by using the command line option --refineLegacy). The legacy refine syntax is documented on jastadd.org, but that documentation contains an error - it is not the aspect name of the original declaration that is used to qualify the refined method, rather it is the legacy aspect name. The legacy aspect name is just the name of the .jrag file, without the .jrag extension.

Comments (1)

  1. Log in to comment