Merge pull request #26 from Recras/typeCasting

Generate type casting code in all cases
Merge remote-tracking branch 'xavier/master'