-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/core/export: fix a recent nil pointer regression
Before the fix, the added test fails with a panic due a nil pointer. The fix prevents accessing the offending pointer. After the fix, the new test passes. Note that we might find a better fix down the line for the root cause; a TODO is added as a reminder. Fixes #2584. Closes #2690 as merged as of commit dec11d9. Signed-off-by: Rudi Farkas <[email protected]> Change-Id: Ic24562fee250e9efcfaaf1a0bf95a514817675a5 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1172874 TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Marcel van Lohuizen <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
- Loading branch information
Showing
2 changed files
with
102 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# issue #2584 | ||
|
||
-- in.cue -- | ||
F1: sub1: sub2: L | ||
F2: { | ||
(string): _ | ||
L | ||
} | ||
D: {} | ||
let L = D | ||
-- out/default -- | ||
-- out/definition -- | ||
|
||
let L = D | ||
F1: { | ||
sub1: { | ||
sub2: L | ||
} | ||
} | ||
F2: { | ||
(string): _ | ||
L | ||
} | ||
D: {} | ||
-- out/doc -- | ||
[] | ||
[F1] | ||
[F1 sub1] | ||
[F1 sub1 sub2] | ||
[F2] | ||
[F2 _] | ||
[D] | ||
[L] | ||
-- out/value -- | ||
== Simplified | ||
{ | ||
let L = D | ||
F1: { | ||
sub1: { | ||
sub2: {} | ||
} | ||
} | ||
F2: { | ||
(string): _ | ||
L | ||
} | ||
D: {} | ||
} | ||
== Raw | ||
{ | ||
let L = D | ||
F1: { | ||
sub1: { | ||
sub2: {} | ||
} | ||
} | ||
F2: { | ||
(string): _ | ||
L | ||
} | ||
D: {} | ||
} | ||
== Final | ||
{ | ||
F1: { | ||
sub1: { | ||
sub2: {} | ||
} | ||
} | ||
F2: _|_ // F2: invalid non-ground value string (must be concrete string) | ||
D: {} | ||
} | ||
== All | ||
{ | ||
let L = D | ||
F1: { | ||
sub1: { | ||
sub2: {} | ||
} | ||
} | ||
F2: { | ||
(string): _ | ||
L | ||
} | ||
D: {} | ||
} | ||
== Eval | ||
{ | ||
let L = D | ||
F1: { | ||
sub1: { | ||
sub2: {} | ||
} | ||
} | ||
F2: { | ||
(string): _ | ||
L | ||
} | ||
D: {} | ||
} |