I also will be very happy if you give me a strict explanation of why func violates LSP. The substitution of A parameter with whatever you want will not alter the correctness of the program, right?
func
A