[BUGFIX] enable plain method calling from templates (no explicit binding required -- follows JS semantics) #21469
Open
NullVoxPopuli wants to merge 1 commit into
Open
[BUGFIX] enable plain method calling from templates (no explicit binding required -- follows JS semantics) #21469NullVoxPopuli wants to merge 1 commit into
NullVoxPopuli wants to merge 1 commit into
Conversation
NullVoxPopuli
commented
Jun 12, 2026
| assert.equal(this.stashedFn(), 'arg1: foo, arg2: bar'); | ||
| } | ||
|
|
||
| '@test there is no `this` context within the callback'(assert) { |
Contributor
Author
There was a problem hiding this comment.
a change in behavior, but for the better -- I dare say: a bugfix
Contributor
📊 Size reportTarball size — dist/dev 0.07%↑
dist/prod 0.08%↑
smoke-tests/v2-app-template/dist 0.05%↑
smoke-tests/v2-app-hello-world-template/dist 0.09%↑
🤖 This report was automatically generated by wyvox/pkg-size |
NullVoxPopuli
commented
Jun 12, 2026
|
|
||
| // eslint-disable-next-line @typescript-eslint/no-unsafe-return -- @fixme | ||
| return (fn as AnyFn).call(context, ...args, ...invocationArgs); | ||
| return (fn as AnyFn).call(self, ...args, ...invocationArgs); |
Contributor
Author
There was a problem hiding this comment.
the actual fix is here
NullVoxPopuli
commented
Jun 12, 2026
| * The reference this one was created from via a property read (`parent.path`), | ||
| * if any. See {@linkcode parentRefFor}. | ||
| */ | ||
| public parent: Nullable<Reference> = null; |
Contributor
Author
There was a problem hiding this comment.
more reference linking 🙈
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
supersedes
this PR enables/unblocks the change in recommendation RFC:
@actiondecorator rfcs#1045Main test cases I care about:
REPL PR: NullVoxPopuli/limber#2170
Deployed: https://test-ember-source-nvp-fix-th.limber-glimdown.pages.dev/
Demo: https://test-ember-source-nvp-fix-th.limber-glimdown.pages.dev/edit?c=JYWwDg9gTgLgBAYQuCA7Apq%2BAzKy4DkAAgOYA2oI6UA9AMbKQZYEDcAUKJLHAN5wwoAQzoBrdABM4AXzi58xcpWo1BI0cFQk27dugAe3eBPTYhAVzLw6ZIQGc7cABLoyZCAHVoZKQZiYJRyQUZnhedjg4IjUxSTgGcyw4AF44AAYOCLhNOih0KiwACgBKPizImAALYDsAOgSkgGpUgEYOSNldSIAef3BbfwA%2BcrhusEGATQhzOEqhADd0eIpYqSqlgCNzGBg0Pl4qmvrprGlZGFB0Ou6aca7I0a2dvZgATzB0ZIAiJ93UL-2ey%2BNmAYgBhzqOTyBRgZ0GCBWohuvzQwx6qnyYAG6GG0nYQA&format=gjs