Skip to content

[SR-8186] Migrated UIKit NSNotification.Name code cannot build due to missing import #50718

Open
@ChristopherRogers

Description

@ChristopherRogers
Previous ID SR-8186
Radar rdar://problem/41850977
Original Reporter @ChristopherRogers
Type Bug
Environment

Xcode 10.0 beta 3 (10L201y)

Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels Bug, Migrator
Assignee None
Priority Medium

md5: 39c49486104e622d2f435b35a231dc4c

Issue Description:

I don't see how this was building before but I guess the migrator should add `import UIKit` if it's missing since it builds in Swift 4.0.

import Foundation

func notificationFromModuleNotImported() -> Notification.Name {
  // Use of unresolved identifier 'UIApplication'
  // return UIApplication.willEnterForegroundNotification
  return .UIApplicationWillEnterForeground
}

I've attached a sample Xcode project for several issues to SR-8180.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.migrator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions