Commit 87d8b52
Apply binding to all path reads, add #let block param test
Move GetPropertyBound emission into withPath so ALL multi-segment
path reads (this.*, @arg.*, blockParam.*, lexical.*) tag the last
segment's ref with its parent. With the ref-tagging approach this
is safe — the value identity is unchanged, only on/fn check the tag.
This means {{#let this.obj as |o|}} followed by o.method correctly
binds method to obj, matching the behavior of this.obj.method.
Also adds a test for the #let + fn pattern per review request:
{{#let this.obj as |o|}}
<button {{on 'click' (fn o.method 'did it')}}>click me</button>
{{/let}}
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>1 parent 4ebeef2 commit 87d8b52
2 files changed
Lines changed: 49 additions & 12 deletions
File tree
- packages
- @ember/-internals/glimmer/tests/integration
- @glimmer/opcode-compiler/lib/syntax
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
73 | 116 | | |
74 | 117 | | |
Lines changed: 6 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 59 | + | |
70 | 60 | | |
71 | 61 | | |
72 | 62 | | |
| |||
95 | 85 | | |
96 | 86 | | |
97 | 87 | | |
98 | | - | |
| 88 | + | |
99 | 89 | | |
100 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
101 | 95 | | |
102 | 96 | | |
103 | 97 | | |
| |||
0 commit comments