Ben Welterveden Ben Welterveden - 10 months ago 45
Swift Question

Invalid redeclaration of 'CURRENT_USER'

I wanted to define a variable for an OS X Application with Swift

But I always get this error in the title.

var CURRENT_USER: Firebase?

I also tried it with func

func var CURRENT_USER: Firebase?

Does anyone knows what I'm doing wrong?



Yes, either:

1) You must have declared CURRENT_USER somewhere else in your code already (in the same Class or func).

2) CURRENT_USER is a variable used by a framework.


Just change the name of the var.