[Laszlo-dev] for review, 20071108-hqm-4.tar, fix for schema warnings from use of "apply" in <state> and subclasses

Henry Minsky henry.minsky at gmail.com
Thu Nov 8 19:50:30 PST 2007


Change 20071108-hqm-4 by hqm at IBM-2E06404CB67 on 2007-11-08 20:33:26 EST
    in /cygdrive/c/users/hqm/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: prevent spurious compiler warnings when overriding apply()
method on subclases of <state>

New Features:

Bugs Fixed: LPP-5067, LPP-5065

Technical Reviewer: ptw
QA Reviewer: pbr
Doc Reviewer:

Documentation:

Release Notes:

Details:


I modified the compiler to not warn if the attribute being overriden
was declared explicitly with a value of "true" for it's 'override' property.

So in lfc.lzx, we declare apply as non overridable, on the base Instance

<interface name="Instance" extends="Object">
  <method name="apply" override="false"/>

but "state" declares it overridable, so any subclass of state can override it


<interface name="state" extends="node">
  <attribute name="apply" override="true" />


I made the compiler not only not warn if you override the method with
another method, but not warn if you override an attribute with a
method. That is a little too loose I guess, but it only happens when you
declare "override=true" on an attribute.


Tests:

Files:
A      test/compiler_errors/override-state-apply.lzx
A      test/compiler_errors/override-builtin.lzx
M      WEB-INF/lps/schema/lfc.lzx
M      WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
M      WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
M      WEB-INF/lps/misc/lzx-autoincludes.properties

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20071108-hqm-4.tar






-- 
Henry Minsky
Software Architect
hminsky at laszlosystems.com


More information about the Laszlo-dev mailing list