-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/trim: prevent nil-pointer panic
Fixes #1087 Change-Id: I471969c6f75361e39f706083eb23a0b005be92ad Signed-off-by: Marcel van Lohuizen <mpvl@golang.org> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/532314 Unity-Result: CUEcueckoo <cueckoo@cuelang.org> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>
- Loading branch information
Showing
2 changed files
with
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#Issue: 1087 | ||
-- in.cue -- | ||
configs: { | ||
key: 123 | ||
} | ||
|
||
shared: { | ||
param: string | ||
derived: configs[param] | ||
} | ||
|
||
a: shared & { | ||
param: "key" | ||
} | ||
-- out/trim -- | ||
== in.cue | ||
configs: { | ||
key: 123 | ||
} | ||
|
||
shared: { | ||
param: string | ||
derived: configs[param] | ||
} | ||
|
||
a: shared & { | ||
param: "key" | ||
} |
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