Implemented semantic checking for duplicated type definition.