SourceLocation can be null

This commit is contained in:
Lauren Tan
2023-06-22 10:18:42 -04:00
parent 3f2b346ba0
commit e9faa5b90d
@@ -72,7 +72,7 @@ export class CompilerError extends Error {
static invariant(
condition: unknown,
reason: string,
loc: SourceLocation,
loc: SourceLocation | null,
description: string | null = null
): asserts condition {
if (!condition) {
@@ -91,7 +91,7 @@ export class CompilerError extends Error {
static todo(
reason: string,
loc: SourceLocation,
loc: SourceLocation | null,
description: string | null = null
): never {
const errors = new CompilerError();
@@ -108,7 +108,7 @@ export class CompilerError extends Error {
static invalidInput(
reason: string,
loc: SourceLocation,
loc: SourceLocation | null,
description: string | null = null
): never {
const errors = new CompilerError();