This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cue: limit number of position errors
Retrieving locations of possible errors does not do cycle checking. Limit number of positions to avoid getting a stack overflow. Fixes #269. Change-Id: Ibd297eeae64386e557a864577b141d2dc8c62dab Reviewed-on: https://cue-review.googlesource.com/c/cue/+/4840 Reviewed-by: Marcel van Lohuizen <mpvl@google.com>
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
! cue eval ./struct.cue | ||
cmp stderr expect-stderr | ||
-- struct.cue -- | ||
type :: { | ||
x: 0 | ||
y: 0 | ||
|
||
if x == 0 {i: 0} | ||
if y == 0 {j: 0} | ||
} | ||
|
||
data: { | ||
a: type | ||
b: type | ||
|
||
b: x: a.x | ||
a: y: b.y | ||
} | ||
-- expect-stderr -- | ||
data.a: conflicting values 0 and a.x (mismatched types int and struct): | ||
./struct.cue:2:8 | ||
./struct.cue:13:11 | ||
data.b: conflicting values 0 and a.x (mismatched types int and struct): | ||
./struct.cue:2:8 | ||
./struct.cue:13:11 |
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