Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-50

RFE: invalid parameters for #if directive should be a parse error?

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 1.5
    • 1.6
    • Engine
    • None
    • Operating System: All
      Platform: PC
    • 7386

    Description

      The 3 lines below will print two No-s and one Yes:
      #if('foo') Yes #else No #end
      #if(1) Yes #else
      No #end
      #if(true) Yes #else No #end

      while the 4 lines bellow will print two Yes-es as
      expected:
      #set($x = 'foo')
      #if($x) Yes #else No #end
      #set($x = 1)
      #if($x) Yes #else No
      #end

      Also, the 2 lines below will print false:
      #set($x = 'x' && true)
      $x

      (Please
      ignore possible false line breaks inserted by bugzilla.)

      Tried with 1.2 Stable and 1.3
      Nightly 22/03

      Attachments

        Activity

          People

            Unassigned Unassigned
            ddekany@freemail.hu Daniel Dekany
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: