Skip to content

Commit

Permalink
Fixed RD-10593 and RD-10594 (#358)
Browse files Browse the repository at this point in the history
* RD-10594: function parameter names aren't quote when needed
* RD-10593: `CsvPackage.outputWriteSupport` is crashing if passed a
random type that isn't a collection or a list.
  • Loading branch information
bgaidioz authored Feb 8, 2024
1 parent 04dcb55 commit d3b3e31
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ object CsvPackage extends CsvPackage {
case Rql2ListType(rType: Rql2RecordType, iProps) =>
if (iProps.nonEmpty) return false;
rType
case _ => return false
}
if (innerRecordType.props.nonEmpty) return false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ trait SourcePrettyPrinter
d
}
case FunType(ms, os, r, props) =>
val args = ms.map(toDoc) ++ os.map(o => o.i <> ":" <+> o.t)
val args = ms.map(toDoc) ++ os.map(o => ident(o.i) <> ":" <+> o.t)
val d = parens(enclosedList(args)) <+> "->" <+> r
if (internal && props.nonEmpty) {
// Wrap in parenthesis to disambiguate the type property annotations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,5 @@ class Antlr4TypeTests extends RawTestSuite {
)
)
}

}

0 comments on commit d3b3e31

Please sign in to comment.