Skip to content

Commit

Permalink
Added test for md5Hash for identical nested functions
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Sep 6, 2024
1 parent 19c2531 commit 8c298e0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/org/rascalmpl/library/lang/rascal/tests/basic/Locations.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -610,4 +610,17 @@ test bool mvnSchemeTest() {


return true;
}
}

@synopsis{Nested clones in different scopes are acceptable}
int fun_with_clone(int n){
if(n > 0){
int h(int n) = 2*n;
return h(n);
} else {
int h(int n) = 2*n;
return h(n);
}
}

test bool noCodeClone() = fun_with_clone(3) == 6;

0 comments on commit 8c298e0

Please sign in to comment.