godot icon indicating copy to clipboard operation
godot copied to clipboard

Can not check if RID in an Array using `in` operator

Open superhighlevel opened this issue 4 months ago • 0 comments

Tested versions

v4.2.2.stable.official [15073afe3], v4.3.stable.official [77dcf97d8], v4.4.dev3.official [f4af8201b]

System information

Godot v4.4.dev3 - Windows 10.0.26100 - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Laptop GPU (NVIDIA; 32.0.15.6094) - 11th Gen Intel(R) Core(TM) i5-11400H @ 2.70GHz (12 threads)

Issue description

In Godot Array's Document, Array.has(value) is equivalent to the in operator

It's normal when using

array.has(rid)

but it returns an error Invalid operands "RID" and "Array" for "in" operator. when using

rid in array

Steps to reproduce

  1. Create an array with any size
  2. Create a RID using any method
  3. Check if the RID in step 2. is in the Array in step 1. using in operator

Minimal reproduction project (MRP)

rid-in-array.zip

superhighlevel avatar Oct 06 '24 08:10 superhighlevel