@malloydata/render 0.0.158 → 0.0.159-dev240806001037

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38903,13 +38903,14 @@ class uB extends PEe.SpaceEntry {
38903
38903
  Qu.SpaceParam = uB;
38904
38904
  class MEe extends uB {
38905
38905
  constructor(e) {
38906
- super(), this.astParam = e;
38906
+ super(), this.astParam = e, this._parameter = void 0;
38907
38907
  }
38908
38908
  parameter() {
38909
- return this.astParam.parameter();
38909
+ return this._parameter !== void 0 ? this._parameter : (this._parameter = this.astParam.parameter(), this._parameter);
38910
38910
  }
38911
38911
  typeDesc() {
38912
- return { dataType: this.astParam.type || "error", expressionType: "scalar", evalSpace: "input" };
38912
+ var e;
38913
+ return { dataType: (e = this.parameter().type) !== null && e !== void 0 ? e : "error", expressionType: "scalar", evalSpace: "constant" };
38913
38914
  }
38914
38915
  }
38915
38916
  Qu.AbstractParameter = MEe;
@@ -48078,7 +48079,15 @@ class TRe extends bRe.MalloyElement {
48078
48079
  var e;
48079
48080
  if (this.default !== void 0) {
48080
48081
  const n = this.default.constantValue();
48081
- return this.type && this.type !== n.dataType && n.dataType !== "error" && this.default.log(`Default value for parameter does not match declared type \`${this.type}\``), !(0, Gj.isCastType)(n.dataType) && n.dataType !== "error" ? (this.default.log(`Default value cannot have type \`${n.dataType}\``), {
48082
+ return this.type && this.type !== n.dataType && n.dataType !== "null" && n.dataType !== "error" && this.default.log(`Default value for parameter does not match declared type \`${this.type}\``), n.dataType === "null" ? this.type ? {
48083
+ value: n.value,
48084
+ name: this.name,
48085
+ type: this.type
48086
+ } : (this.default.log("Default value cannot have type `null` unless parameter type is also specified"), {
48087
+ value: n.value,
48088
+ name: this.name,
48089
+ type: "error"
48090
+ }) : !(0, Gj.isCastType)(n.dataType) && n.dataType !== "error" ? (this.default.log(`Default value cannot have type \`${n.dataType}\``), {
48082
48091
  value: n.value,
48083
48092
  name: this.name,
48084
48093
  type: "error"