-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Description
The record fields uExprType
and uExprExpr
, part of Copilot.Core.Expr.UExpr
, are never really used within the module and only rarely used elsewhere in Copilot or, as far as we know, by any user of Copilot. As a matter of fact, we cannot use them to obtain the value inside the UExpr
due to the existential it encloses.
This fields are not necessary parts of the interface to use Copilot, and not required by Copilot's requirements. Therefore, it would be suitable to remove that definitions from the module.
As per our internal policy of waiting 3 versions from deprecation until a public interface declaration can be removed, those definitions should be deprecated.
Type
- Bug: unused code included in the implementation.
Additional context
None.
Requester
- Ivan Perez
Method to check presence of bug
The field is mentioned in the record definition, but making it a non-record datatype, or not exporting that field in the module exports, does not change the behavior and does not otherwise affect Copilot.
The code compiles without errors and behaves in the same way.
Expected result
The following elements are deprecated:
Copilot.Core.Expr.UExpr.uExprExpr
Copilot.Core.Expr.UExpr.uExprType
Desired result
The following elements are deprecated:
Copilot.Core.Expr.UExpr.uExprExpr
Copilot.Core.Expr.UExpr.uExprType
Proposed solution
Deprecate the following functions:
Copilot.Core.Expr.UExpr.uExprExpr
Copilot.Core.Expr.UExpr.uExprType
Modify any uses of those fields anywhere in Copilot to use pattern matching instead.
Further notes
None.