Ben Welterveden Ben Welterveden - 2 years ago 157
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?

Answer Source


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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download