Permalink
Browse files

Making it so collections can have mixed types #378

  • Loading branch information...
1 parent f23059b commit ca457ace0df4732376833b8694e4affac4143244 @freeeve committed Jan 18, 2013
@@ -29,7 +29,7 @@ trait CypherType {
def mergeWith(other: CypherType): CypherType = {
if (this.isAssignableFrom(other)) other
else if (other.isAssignableFrom(this)) this
- else throw new CypherTypeException("Failed merging " + this + " with " + other)
+ else AnyType()
}
def parentType: CypherType
@@ -2355,4 +2355,9 @@ RETURN x0.name?
assert(result.toList === List())
}
+ @Test def mixed_type_collections_should_be_allowed() {
+ val result = parseAndExecute("START a=node(0) RETURN [1,'hello'] as mixed")
+
+ assert(result.toList.head === Map("mixed" -> List(1,"hello")))
+ }
}

0 comments on commit ca457ac

Please sign in to comment.