Shared: Add an example for SemBound.getExpr.

This commit is contained in:
Geoffrey White
2024-03-04 11:59:52 +00:00
parent cb1c68260e
commit 5def2887e7

View File

@@ -393,7 +393,9 @@ signature module BoundSig<LocationSig Location, Semantic Sem, DeltaSig D> {
Location getLocation();
/**
* Gets an expression that equals this bound plus `delta`.
* Gets an expression that equals this bound plus `delta`. For example given
* the expression `x = foo() + 1` the variable `x` has a bound with
* expression `call to foo()` and delta `-1`.
*
* For the zero-bound this gets integer constants equal to `delta`, and for
* other bounds this gets expressions equal to the bound while `delta = 0`.