Related to ceylon/ceylon-js#284
Resolve return type before validating