Uploaded image for project: 'Lucee Development'
  1. LDEV-835

Static scope corruption caused by inheritance

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0.0.245
    • Labels:
      None

      Description

      Given the following components:

      //base.lucee
      class {
        static { public member = "base"; }
      }
      
      // child.lucee
      class extends=base {
        static { public member = "child"; }
      }
      
      // sibling.lucee
      class extends=base {
        static { public member = "sibling"; }
      }
      

      It does weird things:

      //index.cfm
      dump(Base::member); // expect "base", get "base"
      dump(Child::member); // expect "child", get "child"
      dump(Base::member); // expect "base", get "child"
      dump(Sibling::member); // expect "sibling", get "sibling"
      dump(Child::member); // expect "child", get "sibling"
      dump(Base::member); // expect "base", get "sibling"
      

      It's acting as though all these classes are sharing the same instance of StaticScope.

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              dajester2015 Jesse Shaffer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: