You should report a bug to apple as Xcode is in beta mode so don't expect it to work fine. Although there are many points at which this occurs in my case it was occurring randomly or by writing piece of code in between [].
Download the latest version of Xcode 6 beta and enjoy coding...