cue: bring default values up to spec
This is bolted on to the old implementation. This results
in a more compact representation that could be considered
a premature optimization, but so be it.
Fixes #28.
Change-Id: I57939e69d39d486cf0d8f21d7cdf525d376df670
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/1981
Reviewed-by: Marcel van Lohuizen <mpvl@google.com>
diff --git a/cue/ast.go b/cue/ast.go
index d2bed29..1db9ad8 100644
--- a/cue/ast.go
+++ b/cue/ast.go
@@ -536,6 +536,7 @@
mark = true
n = x.X
}
+ d.hasDefaults = true
}
d.values = append(d.values, dValue{v.walk(n), mark})
}