Skip to content

Arrow function issue #52

@lanechase34

Description

@lanechase34

CFLint seems to have trouble parsing arrow functions - the following code has lint errors, but there is no output when running cflint

component {

    function chase(required numeric modifier) {
        test     = now(); # MISSING_VAR
        modifier = 0; # ARG_VAR_CONFLICT
        test2    = structNew(); # MISSING_VAR, AVOID_USING_STRUCTNEW

        var nums  = [1, 2, 3];
        var total = nums.reduce((num, result) => {
            return result += num;
        }, 0);
        return total * modifier;
    }

}

When you remove the arrow function or replace with 'function()' syntax, the errors will show.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions