eval/rdf.rs:58-62 bails unless the argument is a bare Expression::Var; LANG (eval/string.rs:115-134) silently returns "" for expression arguments. FILTER(datatype(?a + ?b) = xsd:integer) and datatype("foo"@en) fail. 29 W3C tests and any user composing expressions inside these builtins are affected.
Fix: evaluate the argument to a value, read its datatype/lang, type-error on non-literals — SPARQL-scoped per decision D-12 (the @id extension on the JSON-LD surface is deliberate and stays). Roadmap PR-X1 (D2/D2b).
Found and verified by the W3C SPARQL burn-down audit (PR #1437; docs/audit/burn-down/ROADMAP.md §5 on branch test/sparql-testsuite-full-coverage).
eval/rdf.rs:58-62bails unless the argument is a bareExpression::Var;LANG(eval/string.rs:115-134) silently returns""for expression arguments.FILTER(datatype(?a + ?b) = xsd:integer)anddatatype("foo"@en)fail. 29 W3C tests and any user composing expressions inside these builtins are affected.Fix: evaluate the argument to a value, read its datatype/lang, type-error on non-literals — SPARQL-scoped per decision D-12 (the
@idextension on the JSON-LD surface is deliberate and stays). Roadmap PR-X1 (D2/D2b).Found and verified by the W3C SPARQL burn-down audit (PR #1437;
docs/audit/burn-down/ROADMAP.md§5 on branchtest/sparql-testsuite-full-coverage).