[ https://issues.apache.org/jira/browse/TINKERPOP-800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yang Xia closed TINKERPOP-800. ------------------------------ Resolution: Won't Do Closing given [discussion|https://lists.apache.org/thread/om2m0phg25s83529p9w0gldmcxz7578h] - it can be reopened if there is expectation that there will be active work on this item. > Domain/Range checking during traversal construction. > ---------------------------------------------------- > > Key: TINKERPOP-800 > URL: https://issues.apache.org/jira/browse/TINKERPOP-800 > Project: TinkerPop > Issue Type: Improvement > Components: process > Affects Versions: 3.0.2-incubating > Reporter: Marko A. Rodriguez > Priority: Major > Labels: breaking > > I think we should add two new methods to {{Step}}. > {code} > Step.getDomain() -> Class > Step.getRange() -> Class > {code} > Now, when someone does: > {code} > g.V().out() > {code} > {{GraphStep}} will report that its range is {{Vertex.class}}. {{VertexStep}} > will report its domain to be {{Vertex.class}}. Good. No typing issues. > However, when you do this: > {code} > g.E().out() > {code} > {{GraphStep}} will report that its range is {{Edge.class}}. {{VertexStep}} > will report its domain to be {{Vertex.class}} --- {{IllegalArgumentException: > "The provided traversal has an illegal function composition."}}. > Why is this good -- much better than getting random {{ClassCastExceptions}} > at execution time. -- This message was sent by Atlassian Jira (v8.20.10#820010)