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

CFINTERFACE incorrectly enforces output settings to match

    Details

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

      Description

      Copied from https://issues.jboss.org/browse/RAILO-3135

      Railo 4.2.1 still has a bug which CF9 had, ages ago: https://bugbase.adobe.com/index.cfm?event=bug&id=3041802

      Whether or not a function has an OUTPUT setting is neither here nor there as far as the interface contract goes.

      Repro:

      // IForcesOutputOnMethod.cfc
      interface {
      	void function f();
      }
      
      <!--- ForcesOutputOnMethod.cfc --->
      <cfcomponent implements="IForcesOutputOnMethod">
      	<cffunction name="f" returntype="void" output="false">
      	</cffunction>	
      </cfcomponent>
      
      <cfscript>
      // forcesOutputOnMethod.cfm
      
      o = new ForcesOutputOnMethod();
      </cfscript>
      

      On Railo this errors with:

      function [f()] of component [C:\Apps\railo-express-jre-win64\webapps\railo\scribble\shared\git\blogExamples\cfml\interfaces\restrictions\ForcesOutputOnMethod.cfc] does not match the function declaration [f()] of the interface [C:\Apps\railo-express-jre-win64\webapps\railo\scribble\shared\git\blogExamples\cfml\interfaces\restrictions\IForcesOutputOnMethod.cfc]
      

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              da_cameron Adam Cameron
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: