sem error: redeclaration with mismatched types