mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
fix the left()/right() predicates such that they return an Either
This commit is contained in:
@@ -33,8 +33,8 @@ module Either<TypeWithToString Left, TypeWithToString Right> {
|
||||
}
|
||||
|
||||
/** Makes an `Either` from an instance of `Left` */
|
||||
Left left(Left c) { result = c }
|
||||
Either left(Left c) { result.asLeft() = c }
|
||||
|
||||
/** Makes an `Either` from an instance of `Right` */
|
||||
Right right(Right c) { result = c }
|
||||
Either right(Right c) { result.asRight() = c }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user