Open
Description
Previous ID | SR-8180 |
Radar | rdar://problem/44582517 |
Original Reporter | @ChristopherRogers |
Type | Bug |
Attachment: Download
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: 7deb6a8b2a22152df317be5955d289b5
Issue Description:
Migrating this Swift 4.0 code to 4.2 results in the following build errors. (The resulting code is commented out.)
import UIKit
var window: UIWindow?
func foo() {
// error: use of unresolved identifier 'RawValue'
// window!.windowLevel = UIWindow.Level(rawValue: RawValue(Int(window!.windowLevel.rawValue) + 1))
window!.windowLevel = window!.windowLevel + 1
let view = UIView()
let isSelected = true
// error: use of unresolved identifier 'RawValue'
// view.accessibilityTraits = isSelected ? UIAccessibilityTraits(rawValue: RawValue(UInt8(UIAccessibilityTraits.button.rawValue) | UInt8(UIAccessibilityTraits.selected.rawValue))) : UIAccessibilityTraits.button
view.accessibilityTraits = isSelected ? UIAccessibilityTraitButton | UIAccessibilityTraitSelected : UIAccessibilityTraitButton
}