there are 2 issues here.
1 is that you can only connect analog pins to the analog hardware mux, hence the error.
if you want to have a pin that is a digital output, digital input and an analog input, when you select a pin, (any type) double click on the box, then on the type pop up, tick analog, DI and DO with HW connections.
then connect say a PWM to the DO, a gate or something to the DI, and the ADC to the analog stub. then when you want to change between modes (i.e. not be a pwm output but read an ADC measurement, then use the component API's to change the drive mode.
this should gove you the functionality you requested, though what application this would be used for is another question :)
hope this helps.
I was able to get rid of the errors by using the regular analog mux instead of the hardware mux. I'm not sure I understand the difference in this case yet. I'll have to do some functional testing to see if I'm really getting the functionality I am looking for. As for the application, my device will be installed in many different applications. Some may need lots of PWM control, but little ADC, others may be the opposite. This gives the user the ability to fit the hardware to his particular installation needs.