private void addType(Location location, String fullName, TypeRef type) { String typeName = SymbolTable.getTypeNameInSymbolTable(fullName); TypeRef old = types.put(typeName , type); if (old != null) { model .getDiagReporter() .report( Diag.error( location, "Duplicate declaration of type '%s'. Previous location: %s", fullName, old.getLocation().getDisplayString())); } } }
private void addType(Location location, String fullName, TypeRef type) { String typeName = SymbolTable.getTypeNameInSymbolTable(fullName); TypeRef old = types.put(typeName , type); if (old != null) { model .getDiagReporter() .report( Diag.error( location, "Duplicate declaration of type '%s'. Previous location: %s", fullName, old.getLocation().getDisplayString())); } } }