why is this crossed out?

why is this crossed out? The function is defined and I can jump to its declaration.

Screen Shot 2013-06-05 at 1.45.38 PM.png

1

Hi there,

Quite likely it is marked as deprecated (most likely reason + typical style for deprecated function/property/etc).

If there are quite a few of them marked this way -- maybe it's your color scheme then (Settings | Editor | Colors and Fonts).

1
Avatar
Permanently deleted user

Ok, that function had an @deprecated comment above it.

But when I removed that, the function is still crossed out. I even reopenend both files.

0

That's JavaScript. I rarely work with JS and cannot comment how exactly it behaves or should behave (support for JS may have some differences in implementation compared to PHP or another).

Therefore:
1) Please try "File | Invalidate Caches..." -- possibly indexes are not updated.

2) If that will not help -- do a global search for that function name. It's possible (although unlikely) that it is defined twice (multiple copies of the same/similar file) and it still has @deprecated in another location.

3) Try moving this code to brand new empty project (the minimal code required) -- see if it will reproduce the issue.


In any case:

  • You can always disable this inspection: Settings | Inspections | JavaScript | General | Deprecated JavaScript symbol
  • You can change the style for deprecated elements (you may remove strikeout effect): Settings | Editor | Colors and Fonts | General | Deprecated symbol
2
Avatar
Permanently deleted user

Invalidating the cache fixed the problem.

Thanks.

0

请先登录再写评论。