add optional in extend syntax
Merge pull request #1757 from qraynaud/master

add optional in extend syntax