plum
git clone https://git.pyrossh.dev/plum
A statically typed, imperative programming language inspired by rust, python
5887f56
— Peter John
2026-11-01T16:43:44+05:30
T1: review — assert desugared Pair call carries the pair's position
plum-core/tests/parser_test.rs
CHANGED
|
@@ -732,3 +732,16 @@ fn pairKeyAnyExpression() {
|
|
|
732
732
|
pairArgs(a);
|
|
733
733
|
}
|
|
734
734
|
}
|
|
735
|
+
|
|
736
|
+
#[test]
|
|
737
|
+
fn pairArgCallCarriesPairPosition() {
|
|
738
|
+
let args = firstCallArgs("fun main() =\n x := f(1, \"a\" => 2)\n");
|
|
739
|
+
match &args[1] {
|
|
740
|
+
Arg::Positional(Expr::FnCall(c)) => {
|
|
741
|
+
assert_eq!(c.name, "Pair");
|
|
742
|
+
assert_eq!(c.line, 2);
|
|
743
|
+
assert_eq!(c.column, 13);
|
|
744
|
+
}
|
|
745
|
+
o => panic!("not a Pair call: {:?}", o),
|
|
746
|
+
}
|
|
747
|
+
}
|