Skip to content

Commit

Permalink
Correct rebase snags
Browse files Browse the repository at this point in the history
  • Loading branch information
slyubomirsky committed Feb 15, 2019
1 parent de7ea6e commit 8909e18
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/relay/ir/hash.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace relay {
class RelayHashHandler:
public AttrsHashHandler,
public TypeFunctor<size_t(const Type&)>,
public ExprFunctor<size_t(const Expr&)> {
public ExprFunctor<size_t(const Expr&)>,
public PatternFunctor<size_t(const Pattern&)> {
public:
Expand Down
6 changes: 2 additions & 4 deletions src/relay/pass/kind_check.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,8 @@ struct KindChecker : TypeFunctor<Kind(const Type&)> {

Kind VisitType_(const RefTypeNode* op) override {
// ref types should only contain normal types
Kind k = this->VisitType(op->value);
CHECK(k == Kind::kType)
<< "The value inside a ref must be of the type kind but "
<< op->value << " of " << GetRef<RefType>(op) << " is of kind " << k;
RefType rt = GetRef<RefType>(op);
CheckKindMatches(op->value, rt, Kind::kType, "ref contents");
return Kind::kType;
}

Expand Down
4 changes: 2 additions & 2 deletions src/relay/pass/type_infer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,13 @@ class TypeInferencer : private ExprFunctor<Type(const Expr&)>,
}

Type VisitExpr_(const RefReadNode* op) final {
Type it = IncompleteTypeNode::make(TypeVarNode::Kind::kType);
Type it = IncompleteTypeNode::make(Kind::kType);
this->Unify(GetType(op->ref), RefTypeNode::make(it), GetRef<RefRead>(op));
return it;
}

Type VisitExpr_(const RefWriteNode* op) final {
Type it = IncompleteTypeNode::make(TypeVarNode::Kind::kType);
Type it = IncompleteTypeNode::make(Kind::kType);
this->Unify(GetType(op->ref), RefTypeNode::make(it), GetRef<RefWrite>(op));
this->Unify(GetType(op->value), it, GetRef<RefWrite>(op));
return TupleTypeNode::make({});
Expand Down

0 comments on commit 8909e18

Please sign in to comment.