KCL: Rephrase confusing error msg (#6436)

Before:

  × undefined value: memory item key `foo` is not defined

Now:

  × undefined value: `foo` is not defined
This commit is contained in:
Adam Chalmers
2025-04-22 15:24:53 -05:00
committed by GitHub
parent 29d6b22d63
commit 9730e3f5b3
5 changed files with 7 additions and 7 deletions

View File

@ -1585,7 +1585,7 @@ const answer = returnX()"#;
assert_eq!(
err,
KclError::UndefinedValue(KclErrorDetails {
message: "memory item key `x` is not defined".to_owned(),
message: "`x` is not defined".to_owned(),
source_ranges: vec![
SourceRange::new(64, 65, ModuleId::default()),
SourceRange::new(97, 106, ModuleId::default())
@ -1669,7 +1669,7 @@ let shape = layer() |> patternTransform(instances = 10, transform = transform)
assert_eq!(
err,
KclError::UndefinedValue(KclErrorDetails {
message: "memory item key `x` is not defined".to_owned(),
message: "`x` is not defined".to_owned(),
source_ranges: vec![SourceRange::new(80, 81, ModuleId::default())],
}),
);