Skip to content

Commit 0a828f7

Browse files
committed
fix the left()/right() predicates such that they return an Either
1 parent b1001d1 commit 0a828f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shared/util/codeql/util/Either.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ module Either<TypeWithToString Left, TypeWithToString Right> {
3333
}
3434

3535
/** Makes an `Either` from an instance of `Left` */
36-
Left left(Left c) { result = c }
36+
Either left(Left c) { result.asLeft() = c }
3737

3838
/** Makes an `Either` from an instance of `Right` */
39-
Right right(Right c) { result = c }
39+
Either right(Right c) { result.asRight() = c }
4040
}

0 commit comments

Comments
 (0)