Skip to content

[Luau.Ast] Signature mismatch for prettyPrint in PrettyPrinter.h vs PrettyPrinter.cpp #2206

@ActualMasterOogway

Description

@ActualMasterOogway

Description
There is a signature mismatch between the declaration and definition of Luau::prettyPrint.

In Ast/include/Luau/PrettyPrinter.h, the function is declared as accepting a single argument:

std::string prettyPrint(AstStatBlock& ast);

However, in Ast/src/PrettyPrinter.cpp, the definition requires two arguments:

std::string prettyPrint(AstStatBlock& block, const CstNodeMap& cstNodeMap)
{
    // ... implementation
}

Expected behavior
The header declaration should match the source definition, preferably allowing cstNodeMap to be optional via a default argument or function overloading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions