kiritsuku / amora

The semantic search engine where anyone can define anything anywhere
Apache License 2.0
30 stars 1 forks source link

Index compound types in self references #15

Closed kiritsuku closed 7 years ago

kiritsuku commented 8 years ago

Test case (for RegionIndexerTest):

  @Test
  def self_ref_with_compound_type() = {
    ask(modelName, s"""
        PREFIX c:<?MODEL?>
        PREFIX s:<http://schema.org/>
        SELECT * WHERE {
          [c:attachment "ref"] s:name ?name ; c:start ?start ; c:end ?end .
        }
      """,
      "<memory>" → """
        trait X {
          self: [[collection]].[[SeqLike]][ [[List]][ [[Int]] ], [[List]][ [[Int]] ] ]
            with [[collection]].[[IterableLike]][ [[List]][ [[Int]] ], [[List]][ [[Int]] ] ]
            with [[collection]].[[GenSeqLike]][ [[List]][ [[Int]] ], [[List]][ [[Int]] ] ] ⇒
        }
      """)
  }

The compound types are simply not indexed.