Private functions used in template getting highlighted as declared but never
See original GitHub issue- I have searched through existing issues
- I have read through docs
- I have read FAQ
- I have tried restarting VS Code or running
Vetur: Restart VLS
Info
- Platform: macOS
- Vetur version: 0.32.0
- VS Code version: 1.52.1
Problem
Something changed very recently which has caused all of my private functions only used within the templates to be highlighted as declared but never read. It appears this might be a regression as it looks like this was handled with a workaround here:
https://github.com/vuejs/vetur/pull/1243
Here is an older issue that is still open talking a bit more about the original issue that prompted the workaround:
https://github.com/vuejs/vetur/issues/1261
Reproducible Case
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
C++: Why must private functions be declared? - Stack Overflow
The compiler wants to know the signature of the function before it can use it. That's why you declare functions in the first...
Read more >Templates, C++ FAQ
A template is not a class or a function. A template is a “pattern” that the compiler uses to generate a family of...
Read more >Compiler Warnings by compiler version | Microsoft Learn
Use /Wv:19.11 to report the warnings introduced in any version of Visual Studio before Visual Studio 2017 version 15.5, but suppress warnings ...
Read more >Code Inspection: Unused local variable - ReSharper - JetBrains
This inspection detects local variables in a method that are declared and may be assigned, but are never used. Such a variable might...
Read more >Explicit instantiation (C++ only) - IBM
In this example, you can use the explicit instantiation definition template int X<int>::v(int) even though the member function is declared to be private....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It isn’t a regression. In fact, they have similarities, but they also have differences.
Same:
Not same:
<template>
region, but this issue is in the<script>
region.<template>
region.The nature of the problem is same as #1261. So I closed this issue. Now I’ve changed my mind. This issue can be focused on the
<script>
region.They don’t generate suggestion diagnostics in
<script>
region in the past. Inv0.32.0
, we start to generate suggestion diagnostics in<script>
region.I have the same problem