Skip to content

Commit 1967d62

Browse files
stepanchegfacebook-github-bot
authored andcommitted
Make TyName intersect with TyStarlarkValue
Summary: If a value is known to be generic unnamed `transitive_set` (expressed as `TyStarlarkValue`), and function signature has `"XxxTSet"`, there's not much better we can do. Following diff D48932839 does not work without it. `TyName` is going away anyway. Reviewed By: ianlevesque Differential Revision: D48935085 fbshipit-source-id: d9ec1d31161e6ad00652ea49bf1006d44800e6c6
1 parent fe0dd85 commit 1967d62

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
@@ -848,6 +848,7 @@ impl<'a> TypingOracleCtx<'a> {
848848
(TyBasic::Any, _) => true,
849849
(TyBasic::Name(x), TyBasic::Name(y)) => self.intersects_name(x, y),
850850
(TyBasic::Name(_), TyBasic::Custom(_)) => true,
851+
(TyBasic::Name(_), TyBasic::StarlarkValue(_)) => true,
851852
(TyBasic::Name(x), y) => Some(x.as_str()) == y.as_name(),
852853
(TyBasic::List(x), TyBasic::List(y)) => self.intersects(x, y),
853854
(TyBasic::Dict(x_k, x_v), TyBasic::Dict(y_k, y_v)) => {

0 commit comments

Comments
 (0)