Skip to content

Commit

Permalink
Merge pull request #1114 from LeoWoerteler/gh-1113
Browse files Browse the repository at this point in the history
[FIX] XQuery, GH-1113: Wrong cached `SeqType` for `array(*)*`.
  • Loading branch information
ChristianGruen committed Mar 26, 2015
2 parents 8193559 + bb88d12 commit a961894
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ public String toString() {
/** Single map. */
public static final SeqType MAP_O = new SeqType(ANY_MAP);
/** Zero or more arrays. */
public static final SeqType ARRAY_ZM = new SeqType(ANY_ARRAY);
public static final SeqType ARRAY_ZM = new SeqType(ANY_ARRAY, Occ.ZERO_MORE);
/** Single array. */
public static final SeqType ARRAY_O = new SeqType(ANY_ARRAY);
public static final SeqType ARRAY_O = ANY_ARRAY.seqType();
/** One xs:hexBinary. */
public static final SeqType HEX = AtomType.HEX.seqType();
/** Single xs:base64Binary. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,13 @@ public void gh1038() {
"",
"exists(//" + Util.className(Empty.class) + ")");
}

/** Tests inlining of a function literal. */
@Test
public void gh1113() {
check("let $join := array:join#1 return $join(([], []))",
"[\n]",
"empty(//" + Util.className(DynFuncCall.class) + ')',
"empty(//" + Util.className(StaticFuncCall.class) + ')');
}
}

0 comments on commit a961894

Please sign in to comment.