Skip to content

type mismatch in complex return expressions #20

@Moinheart

Description

@Moinheart

I try to use Reactiveneo like this referred in README.md:

(TestNode( _.name := "Tom" ) :->: TestRelationship() :<-: TestNode()) .returns { case t1 ~~ r ~~ t2 ~~ _ => t1}

but there is a compile error in returns method:

type mismatch, expected: (PatternLink[TestNode, PatternLink[TestRelationship, PatternLink[TestNode, PNil]]]) => ReturnExpression[NotInferedURT], actual: (PatternLink[TestNode, PatternLink[TestRelationship, PatternLink[TestNode, PNil]]]) => GraphObject[GO, _]

and when i write returns { case t1 ~~ r ~~ t2 ~~ _ => r} or returns { case t1 ~~ r ~~ t2 ~~ _ => t2}, the error msg is:

type mismatch, expected: (PatternLink[TestNode, PatternLink[TestRelationship, PatternLink[TestNode, PNil]]]) => ReturnExpression[NotInferedURT], actual: (PatternLink[TestNode, PatternLink[TestRelationship, PatternLink[TestNode, PNil]]]) => Pattern

Could you help me solve this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions