Xcode8: changing code indentation makes error sigil flicker, then disappear, yielding incorrect correctness appearance of code

Originator:markd
Number:rdar://27384118 Date Originated:7/15/2016
Status:Open Resolved:
Product:Developer Tools Product Version:Version 8.0 beta 2 (8S162m)
Classification:Serious Bug Reproducible:I didn't try
 
Summary:
Attached is a video showing the problem.
Attached is the project file.

TL;DR - I outdented some incorrect code,  and indented it back.  The line of code with a legitimate error had a red-error-sigil courtesy of Live Issues.  After outdenting and indenting, the error sigil turned disabled-gray, and then disappeared, making me think that my incorrect code suddenly is correct now.

I outdent code (with command-[) before copying it into our Big Nerd Ranch course materials  because the extra level of indentation of the average swift function isn't useful in print - just four wasted columns that we can otherwise use.

So I shifted-over this code:

```
    @IBAction func startObserving() {
        guard progress == nil else {
            // disallow multiple concurrent progress objects
            return
        }
        
        progress = Progress(totalUnitCount: 30)
        swift.watchProgress(progress)
    }
```

'swift.watchProgress(_: Progress)` doesn't exist yet. So this is erroneous code.

In the process of outdenting it, copying it, and re-indenting. I noticed the error sigil disappearing.  It happened reliably enough (about 9 times out of 10) I started up screen flow to catch evidence of the editor losings its mind.  The video shows a successful identification of the error, and then a disappearance of the error signs.

Steps to Reproduce:
It's one of those "have to use Xcode for a while before it loses its mind" things. Quitting Xcode and re-running it doesn't show the problem, so there's something deep in the editor stuff that's going wrong, as witnessed by the evidence here.

Expected Results:


Actual Results:


Version:
Version 8.0 beta 2 (8S162m)
10.11.5 (15F34)


Notes:
It's really not that big a deal - just scratch your head and restart Xcode, but
when these kinds of things happen day-in, day-out, it's just another heavy-sigh
death-of-a-thousand-cuts that makes using Xcode unpleasant.


Configuration:


Attachments:
'bizarre-error-disappearance.mp4' and 'ObjCInterop.zip' were successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!