support @:optional abstracts (closes #2636)

See #2636