Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error with nested if()? #229

Closed
mpaluchowski opened this issue Jan 2, 2017 · 1 comment
Closed

Parsing error with nested if()? #229

mpaluchowski opened this issue Jan 2, 2017 · 1 comment

Comments

@mpaluchowski
Copy link
Contributor

For this file, named Test.cfc:

/**
* Some explanation.
*/
component {

  /**
  * Some function explanation.
  *
  * @localData Something.
  * @keyToCheck Something else.
  */
  public string function extractInfo(required struct localData, required string keyToCheck) {
    if (!isNull(localData)) {
      if (structKeyExists(localData, keyToCheck)) {
          return localData[keyToCheck];
      }
    }
  }
}

CFLint reports the following:

$ java -jar CFLint-0.11.1-all.jar -file Test.cfc
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Attempt to process expression twice aborted.  This may be a parsing bug.
<issues version="0.11.1">
</issues>

The Attempt to process expression twice aborted. This may be a parsing bug. is triggered by both of the if lines together, because if I remove either of the, the message disappears. I tried moving around some brackets, spaces etc. to pinpoint the exact cause, but the message staid.

ryaneberly added a commit that referenced this issue Jan 6, 2017
fixed "Attempt to process expression twice aborted. " on if/elses
@ryaneberly
Copy link
Contributor

@mpaluchowski , thanks for the clear code sample. It was a false positive. It is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants