Fixes typehint bug, adds test for decorator trait