Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-65

Type errors or compile errors can occur when a ruel matches multiple methods on the same class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.2.0
    • 1.1.1
    • None
    • None

      When a rule omits to provide a method signature in the METHOD clause it can match multiple methods of a given class which have the specified name but different signatures. During transformation of the class each of the matched methods has its trigger code injected by a trigger method adapter. The adapter records details of the matched method arguments and local variables in a Bindings structure attached to a Rule instance which is created at start of traansform. This means that bindings introduced during injection into earlier matched methods can be overwritten as successive methods are matched. This can lead to type mismatches which manifests either during typecheck or compile. The solution is to create a Rule instance for each successive trigger injection operation.

            rhn-engineering-adinn Andrew Dinn
            rhn-engineering-adinn Andrew Dinn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: