Xcode 6 Beta 5错误 - 使用未解析的标识符'..'

Hap*_*eet 1 xcode xcode6

我不知道为什么我收到这个错误?我正在使用Xcode 6 beta 5

func random() ->UInt32 {
    var range = UInt32(50)..UInt32(200)
    return range.startIndex + arc4random_uniform(range.endIndex - range.startIndex + 1)
Run Code Online (Sandbox Code Playgroud)

我收到错误 - 使用未解析的标识符'..'

请帮忙,谢谢

BJ *_*mer 5

在beta 3中,半闭合范围算子从..变为..<.所以你的第二行应该是这样的:

var range = UInt32(50)..<UInt32(200)