Could somebody explain why
test = Compile[{{x}},
Return[x];
];
test[0.]
returns
Compile::cret: "The type of return values in Return[x]; are different. Evaluation will use the uncompiled function. "
while
test = Compile[{{x}},
Return[x]
];
test[0.]
works as expected? Notice that the only difference is the semicolon at the end of Return.