Skip to content

If the expression after the return statement is on a new line, the generated code is incorrect #2704

Closed
@victorhurdugaci

Description

@victorhurdugaci

Typescript:

    private isIdentifierCharacter(char: string): boolean {
        var charCode = char.charCodeAt(0);
        return
            ((charCode >= 'a'.charCodeAt(0) && charCode <= 'z'.charCodeAt(0)) ||
            charCode == '_'.charCodeAt(0));
    }

Generated js:

 FormulaScanner.prototype.isIdentifierCharacter = function (char) {
        var charCode = char.charCodeAt(0);
        return;
        ((charCode >= 'a'.charCodeAt(0) && charCode <= 'z'.charCodeAt(0)) || charCode == '_'.charCodeAt(0));
    };

Notice the ; after return in the generated code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    By DesignDeprecated - use "Working as Intended" or "Design Limitation" instead

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions