Skip to content

wheels-basecoat fails to load on Adobe ColdFusion due to reserved keyword switch used as variable name #15

@zainforbjs

Description

@zainforbjs

Describe the bug
When running a Wheels application on Adobe ColdFusion and loading packages, the wheels-basecoat package fails to compile with the following error:

wheels-basecoat:
Invalid CFML construct found on line 2090 at column 25.
ColdFusion was looking at the following text:

switch

The CFML compiler was processing:

A script statement beginning with public on line 2086, column 9.

The problematic line is:
boolean switch = false,

Adobe ColdFusion treats switch as a reserved keyword and does not allow it to be used as a variable or argument name.

To Reproduce
Steps to reproduce the behavior:

  1. Run a Wheels application using Adobe ColdFusion.
  2. Install the wheels-basecoat package.
  3. Navigate to the Packages page or otherwise trigger package loading.
  4. Observe the compilation error shown above.

Expected behavior
The wheels-basecoat package should compile and load successfully on Adobe ColdFusion.

Screenshots

Desktop:
OS: Any
CFML Engine: Adobe ColdFusion

Additional context
The issue is caused by using switch as a variable or parameter name. While this may be accepted in some Lucee, Adobe ColdFusion treats switch as a reserved keyword.

Suggested fix:
Rename the variable to something non-reserved, for example:
boolean isSwitch = false,

or
boolean enableSwitch = false,

This issue prevents wheels-basecoat from loading on Adobe ColdFusion and is a cross-engine compatibility problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions