This commit is contained in:
nub31
2026-03-09 16:38:09 +01:00
parent 32042d0769
commit 4210ad878b
8 changed files with 800 additions and 675 deletions

View File

@@ -144,9 +144,15 @@ if (!compileLib)
return 1;
}
if (entryPointType.Parameters.Any())
if (entryPointType.Parameters.Count != 1)
{
DiagnosticFormatter.Print(Diagnostic.Error($"Entrypoint must not take any parameters").Build(), Console.Error);
DiagnosticFormatter.Print(Diagnostic.Error($"Entrypoint must take exaxtly one parameter").Build(), Console.Error);
return 1;
}
if (entryPointType.Parameters[0] is not NubTypeArray { ElementType: NubTypeString })
{
DiagnosticFormatter.Print(Diagnostic.Error($"First parameter of entrypoint must be a string array").Build(), Console.Error);
return 1;
}