Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 7.3: import Module displayed with strikethrough

After upgrading Xcode to 7.3, I just found that some modules are stricken out while importing, like in this screenshot:

But after adding the module (so just pressing enter) everything is fine. What does that mean? The module here is written in Swift and works fine.

like image 839
derdida Avatar asked Mar 23 '16 14:03

derdida


2 Answers

This is a bug. We have fixed it in 218010af, which should be included in the Swift 2.2.1 release and is included in the 2016-04-12-a developer snapshot.

like image 119
Xi Ge Avatar answered Oct 28 '22 02:10

Xi Ge


The strikethrough occurs if you try to import a module that has already been imported by your file or module:

import

In this case, I have already imported Foundation (which implicitly imports CoreFoundation), so Xcode is telling you that there is no need to import either module again.

like image 24
JAL Avatar answered Oct 28 '22 01:10

JAL