Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error highlight in wrong place when same substring appears on line #773

Open
ef4 opened this issue Sep 27, 2024 · 0 comments
Open

Error highlight in wrong place when same substring appears on line #773

ef4 opened this issue Sep 27, 2024 · 0 comments

Comments

@ef4
Copy link
Contributor

ef4 commented Sep 27, 2024

In this example:

import { TemplateOnlyComponent } from '@ember/component/template-only';

function options(): any {
  return [];
}

export default <template>
  <div class='flex flex-col container m-2 p-6'>
    {{#each (options) as |option|}}{{/each}}

  </div>
</template> satisfies TemplateOnlyComponent<{ Args: { thing: object } }>;

Glint is underlying the first occurrent of the string "option" in the template, when it's trying to complain about the second one (being unused).
Screenshot 2024-09-27 at 5 43 32 PM

If I pick a different name for the helper function that doesn't contain the substring "option", the error highlight moves to the correct place.

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

No branches or pull requests

1 participant