Skip to content

[CS2] Lexer/Nodes: Expansion that becomes rest parameter causes runtime error #4631

@Inve1951

Description

@Inve1951

copy pasting from actual code

header = header[(6 + header.lastIndexOf "/\/ME"+"TA") ... header.lastIndexOf "*/\/"]  # BD EOL bug workaround

used to compile to: (cs2-beta3)

header = header.slice(6 + header.lastIndexOf("/\/ME" + "TA"), header.lastIndexOf("*/\/"));

output with beta4:

header = header[(6 + header.lastIndexOf("/\/ME" + "TA"))(...header.lastIndexOf("*/\/"))];

now throws at runtime: TypeError: (var)[Symbol.iterator] is not a function(…)
also the supposed comment is missing in the js

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions