Skip to content

Commit

Permalink
Bizarre discovery: duplicate definitions of isListRelType
Browse files Browse the repository at this point in the history
It turns out that Type.rsc contained duplicate, not completely
identical, definitions for the functions for isListRelType. Clearly the
result of copy/paste.

This surfaced, after introducing hashing of function bodies (for the
benefit of generating unique names for overloaded functions in the
presence of M3-style logical locations).
  • Loading branch information
PaulKlint committed Feb 25, 2024
1 parent 1e30ce8 commit 1a39d43
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/org/rascalmpl/library/Type.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -642,13 +642,6 @@ public bool isListType(Symbol::\list(_)) = true;
public bool isListType(Symbol::\lrel(_)) = true;
public default bool isListType(Symbol _) = false;

@synopsis{Determine if the given type is an lrel.}
public bool isListRelType(Symbol::\alias(_,_,Symbol at)) = isListRelType(at);
public bool isListRelType(Symbol::\parameter(_,Symbol tvb)) = isListRelType(tvb);
public bool isListRelType(Symbol::\label(_,Symbol lt)) = isListRelType(lt);
public bool isListRelType(Symbol::\lrel(_)) = true;
public default bool isListRelType(Symbol _) = false;

@synopsis{Determine if the given type is an map.}
public bool isMapType(Symbol::\alias(_,_,Symbol at)) = isMapType(at);
public bool isMapType(Symbol::\parameter(_,Symbol tvb)) = isMapType(tvb);
Expand Down

0 comments on commit 1a39d43

Please sign in to comment.