Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/core/adt: match patterns only if type matches
Failing to add this check may lead to incorrect errors. An alterantive fix would be to check for each case in the switch statement whether the type matches. Some of them do, but not all. Easier seems to do a catch all at the top. Issue #2884 Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com> Change-Id: Iab4f0e043439a654747e9f545cda8fa561686135 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1191573 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
- Loading branch information
Showing
3 changed files
with
33 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters