If you attempt to actually return a value in a void method, the compiler generates an error.
package{
import flash.display.Sprite;
publicclass Main extends Sprite{
public function Main(){
}
private function sampleMethod ( ):void {
return "some value"; // This causes the compiler to generate an error.
}
}
}