Skip to content

Commit 7a96cf5

Browse files
stepanchegfacebook-github-bot
authored andcommitted
Make any TyName intersect with any TyCustom
Summary: Following diff D48893103 implements `Provider` type as `TyUser` (which is `TyCustom`), but does not yet convert concrete provider types to `TyUser`. So we need to intersect `TyUser` with `TyName`. This makes typechecker a bit weaker than before, but that's fine because the plan is to get rid of `TyName`. Reviewed By: ianlevesque Differential Revision: D48893554 fbshipit-source-id: 976dd58685cf7f11e648b812d73cf07631920ae9
1 parent 0ced358 commit 7a96cf5

File tree

1 file changed

+1
-0
lines changed
  • starlark/src/typing/oracle

1 file changed

+1
-0
lines changed

starlark/src/typing/oracle/ctx.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,7 @@ impl<'a> TypingOracleCtx<'a> {
854854
match (x, y) {
855855
(TyBasic::Any, _) => true,
856856
(TyBasic::Name(x), TyBasic::Name(y)) => self.intersects_name(x, y),
857+
(TyBasic::Name(_), TyBasic::Custom(_)) => true,
857858
(TyBasic::Name(x), y) => Some(x.as_str()) == y.as_name(),
858859
(TyBasic::List(x), TyBasic::List(y)) => self.intersects(x, y),
859860
(TyBasic::Dict(x_k, x_v), TyBasic::Dict(y_k, y_v)) => {

0 commit comments

Comments
 (0)