4

I've run into something odd in AppCode 2016.1.1. I don't remember this as an issue prior to the 2016 release.

If I have the following:

NSString *temp = @"test";

The temp variable gets red-flagged as non-resolvable, and code completion will not call it up.

If I prefix the declaration with const, the flag clears and the variable is resolvable.

const NSString *temp = @"test";

Anyone know why this is? I thought NSString was inherently const, so I shouldn't have to do this. Maybe it's a new inspection that's enforcing some code magic that I'm not familiar with.

Non-pointer variables work fine.

David Nedrow
  • 1,098
  • 1
  • 9
  • 26
  • 1
    Please, try to File->Invalidate Caches first. If it will not help, please submit the test project to our tracker https://youtrack.jetbrains.com/issues/OC, so we can investigate the issue. The situation described by you should not happen, however we did not saw such issue. – Stanislav Dombrovsky Apr 26 '16 at 17:33
  • @StanislavDombrovsky, your response is what JetBrains says about almost every issue. This doesn't resolve the problem no matter how many times you try it. – nenchev Aug 01 '18 at 16:30
  • @nenchev When we ask to perform any step, there is a strong reason behind it. Always, without any exceptions. The reason for invalidating caches here is simple: 90% that it's a cache issue, cause here we are talking about the local variable resolve. And 90% of such issues disappear after the cache invalidation. 10% it's a regression that needs to be fixed. In this case, it's usually impossible to analyze it correctly anywhere except our tracker. – Stanislav Dombrovsky Aug 02 '18 at 08:14

0 Answers0