From 071246dab716918b78ee97107f71150ce7412344 Mon Sep 17 00:00:00 2001 From: Stiopa Koltsov Date: Thu, 26 Sep 2024 00:22:36 -0700 Subject: [PATCH] Prohibit list["string"] Summary: Slowly eliminating strings as types. Reviewed By: JakobDegen Differential Revision: D63306076 fbshipit-source-id: e8553b6630a43da38626f976e300b8058e56bf40 --- starlark/src/values/types/function.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starlark/src/values/types/function.rs b/starlark/src/values/types/function.rs index 0c77e1b99..9998ff602 100644 --- a/starlark/src/values/types/function.rs +++ b/starlark/src/values/types/function.rs @@ -243,7 +243,7 @@ impl<'v> StarlarkValue<'v> for NativeFunction { fn at(&self, index: Value<'v>, heap: &'v Heap) -> crate::Result> { 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, "[]"),