Skip to content

Commit

Permalink
Prohibit list["string"]
Browse files Browse the repository at this point in the history
Summary: Slowly eliminating strings as types.

Reviewed By: JakobDegen

Differential Revision: D63306076

fbshipit-source-id: e8553b6630a43da38626f976e300b8058e56bf40
  • Loading branch information
stepancheg authored and facebook-github-bot committed Sep 26, 2024
1 parent 2010c4d commit 071246d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion starlark/src/values/types/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ impl<'v> StarlarkValue<'v> for NativeFunction {
fn at(&self, index: Value<'v>, heap: &'v Heap) -> crate::Result<Value<'v>> {
match &self.special_builtin_function {
Some(SpecialBuiltinFunction::List) => {
let index = TypeCompiled::new_with_string(index, heap)?;
let index = TypeCompiled::new(index, heap)?;
Ok(TypeCompiled::type_list_of(index, heap).to_inner())
}
_ => ValueError::unsupported(self, "[]"),
Expand Down

0 comments on commit 071246d

Please sign in to comment.