Skip to content

Commit

Permalink
Fixed error in collect for bounded type parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Sep 1, 2024
1 parent 528d1ac commit 1a73195
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -884,10 +884,11 @@ void collect(current: (TypeVar) `& <Name n> \<: <Type tp>`, Collector c){
c.calculate("xxx", current, [n], AType (Solver s) { return s.getType(n)[closed=closed]; });
//if(debugTP)println("Use <pname> at <current@\loc>");
} else if(<true, rel[str, Type] tpbounds> := useBoundedTypeParameters(c)){
if(tpbounds[pname]?){
if(!isEmpty(tpbounds[pname])){
bnds = toList(tpbounds[pname]);
c.calculate("type parameter with bound", n, bnds,
AType(Solver s){
for(bnd <- bnds) println("<bnd>: <s.getType(bnd)>");
new_bnd = (avalue() | aglb(it, s.getType(bnd)) | bnd <- bnds);
return aparameter(prettyPrintName(n), s.getType(new_bnd), closed=true);
});
Expand Down

0 comments on commit 1a73195

Please sign in to comment.