If the function isn't defined by parts on [a, b], I would say it means the function is constant on [a, b]. Because if c is a local max it means that for x near c, f(x) is smaller or equal to f(c). If additionnaly, c is a local min it means that for x near c, f(x) is greater or equal to f(c). Since for all real numbers we can only have one of the three <, > or =, it will be that f(x) = f(c) near c.
(but I'm just a student like you so don't take this too seriously)