contract compatibility of type annotations