Skip to content

UPSTREAM PR #18905: jinja: correct member access rule - #956

Open
loci-dev wants to merge 1 commit into
mainfrom
upstream-PR18905-branch_ngxson-xsn/jinja_correct_obj_access_rule
Open

UPSTREAM PR #18905: jinja: correct member access rule#956
loci-dev wants to merge 1 commit into
mainfrom
upstream-PR18905-branch_ngxson-xsn/jinja_correct_obj_access_rule

Conversation

@loci-dev

Copy link
Copy Markdown

Mirrored from ggml-org/llama.cpp#18905

Bug spotted by @pwilkin

If object contains a key that shadow the builtin function name, then depending on syntax:

  • obj.member --> the builtin takes precedence over the defined value
  • obj["member"] --> the defined value takes precedence over the builtin

Example:

{{ obj.keys()|join(',') }} vs {{ obj['keys'] }} vs {{ obj.test }}

With input:

{
  "obj": {
    "keys": "value",
    "test": "attr_value"
  }
}

Results in:

keys,test vs value vs attr_value

@loci-review

loci-review Bot commented Jan 18, 2026

Copy link
Copy Markdown

Explore the complete analysis inside the Version Insights

@loci-dev
loci-dev force-pushed the main branch 27 times, most recently from 4bb08b0 to 238591d Compare January 22, 2026 15:14
@loci-dev
loci-dev force-pushed the main branch 30 times, most recently from 6eb0c40 to 88cfbb6 Compare January 28, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants