The issue is that the build system will not guarantee the order in which instances are created across different source files.
The instance of Brain is defined I’m assuming somewhere else such as robot-config.cpp. That means it may not have been created, and therefore the Brain.ThreeWirePort also not created, when you try to access it in your main.cpp source file. The solution is to either move
bumper LiftBumper = bumper(Brain.ThreeWirePort.A);
into the same file (and placed after) as the Brain instance, or use another instance of the ThreeWirePort that you define in main.cpp like this.
triport myThreeWirePort(PORT22);
bumper LiftBumper = bumper( myThreeWirePort.A );
PORT22 is the port number for the internal 3-wire port (which is called a triport in the VEXcode SDK).
If possible, I would use the first solution above
(edit: yes, I realize that although the second solution will work in the case of a bumper switch, it may not work for other sensor types, I need to look into that I guess)