mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-13 07:10:54 +01:00
Fix CLI reportError showing wrong file names
This commit is contained in:
parent
6342913533
commit
bd78c493c5
1 changed files with 7 additions and 5 deletions
|
@ -34,8 +34,10 @@ static void report(ReportFormat format, const char* name, const Luau::Location&
|
|||
}
|
||||
}
|
||||
|
||||
static void reportError(ReportFormat format, const char* name, const Luau::TypeError& error)
|
||||
static void reportError(ReportFormat format, const Luau::TypeError& error)
|
||||
{
|
||||
const char* name = error.moduleName.c_str();
|
||||
|
||||
if (const Luau::SyntaxError* syntaxError = Luau::get_if<Luau::SyntaxError>(&error.data))
|
||||
report(format, name, error.location, "SyntaxError", syntaxError->message.c_str());
|
||||
else
|
||||
|
@ -58,7 +60,7 @@ static bool analyzeFile(Luau::Frontend& frontend, const char* name, ReportFormat
|
|||
}
|
||||
|
||||
for (auto& error : cr.errors)
|
||||
reportError(format, name, error);
|
||||
reportError(format, error);
|
||||
|
||||
Luau::LintResult lr = frontend.lint(name);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue