Skip to content

Commit

Permalink
Revert "No longer ignoreCompiler for avoidEmpty"
Browse files Browse the repository at this point in the history
This reverts commit 32e786b.
  • Loading branch information
PaulKlint committed Mar 18, 2024
1 parent 32e786b commit 473b075
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ bool less(&T a, &T b) = a < b;

test bool lessIsConsistentThroughTypeParameters(num x, num y) = (x < y) ==> less(x, y);

&T avoidEmpty(list[&T] _) { throw "this should not happen"; }
@ignoreCompiler{How to make 1 compatible with &T?}
&T avoidEmpty(list[&T] _) { return 1; }
@ignoreCompiler{How to make 1 compatible with &T?}
&T avoidEmpty(list[&T] _) { throw "this should happen"; }

@ignoreCompiler{How to make 1 compatible with &T?}
test bool voidReturnIsNotAllowed() {
try {
avoidEmpty([]);
Expand Down

0 comments on commit 473b075

Please sign in to comment.