SyntacticType.Set t = (SyntacticType.Set) type;
return SemanticType.Set(true,convert(t.element,generics,context));
} else if(type instanceof SyntacticType.Map) {
// FIXME: need to include the map constraints here
SyntacticType.Map t = (SyntacticType.Map) type;
SemanticType key = convert(t.key,generics,context);
SemanticType value = convert(t.value,generics,context);
if (key instanceof SemanticType.Void
|| value instanceof SemanticType.Void) {
// surprisingly, this case is possible and does occur.
return SemanticType.Set(true, SemanticType.Void);
} else {
return SemanticType.Set(true, SemanticType.Tuple(key, value));
}
} else if(type instanceof SyntacticType.List) {
// FIXME: need to include the list constraints here
SyntacticType.List t = (SyntacticType.List) type;
SemanticType element = convert(t.element,generics,context);
if (element instanceof SemanticType.Void) {
// surprisingly, this case is possible and does occur.
return SemanticType.Set(true, SemanticType.Void);
} else {
return SemanticType.Set(true,