Fix panic when getting the line, column of diagnostic with invalid span

Introduced in cbc0c790a3
This commit is contained in:
Olivier Goffart 2023-04-19 12:35:17 +02:00
parent 84c4f817f1
commit 4076df928d
2 changed files with 8 additions and 0 deletions

View file

@ -304,6 +304,8 @@ SCENARIO("Component Compiler")
REQUIRE(diags.size() == 1);
REQUIRE(diags[0].message.starts_with("Could not load"));
REQUIRE(diags[0].line == 0);
REQUIRE(diags[0].column == 0);
}
SECTION("Compile from path")