Function extendsObject2

Creates an object type that extends 2 other object types