Here, usage of ternery operators is having illegal syntax . As return which is a statement line should never be used in ternary operators .
Syntax is :==
(cond.) ? Expression 1 : expression 2
Return is not a expression.
Moreover, exp 2 data type should also be implicitly convertible to exp 1, which cannot be done here..
Return (( a > b ) ? a : b) is valid syntax..