Strict typing does not differentiate between attributes of the same object

Reproduction Steps
In studio, open a script. Make some kind of an instance (doesn’t matter what kind), then set attributes to it that have different types.
For example:

--!strict
local example = Instance.new("Folder")
example:SetAttribute("TEST1", false)
example:SetAttribute("TEST2", "String")

Now the test2 line will have a warning about attribute type not being a boolean/can’t convert into boolean…

Expected Behavior
I expect the warning not to be triggered since those are different attributes.

Actual Behavior
I get warnings when setting different attributes that are not the same type to the same object.

fgsegegewg

Workaround
It still runs the code but it’s distracting since there is no real issue.

Issue Area: Studio
Issue Type: Other
Impact: Low
Frequency: Constantly
Date Last Experienced: 2022-02-14 00:02:00 (+02:00)
A private message is associated with this bug report

1 Like

Can’t reproduce. Is the repro the same way you wrote your original code?

image

image

1 Like

Don’t know what to tell you:
Capture1111

I am able to easily reproduce this, and it appears the same on other computers/users (my team’s).
When I tried your code it did not do this.
I believe this happens when you get an argument from a function and try to set attributes to it.

Thanks for the report! We’ll follow up when we have an update for you.

3 Likes

So sorry for the late response. Is this still an issue? We’re unable to repro. Assuming the problem is resolved.