Whenever there is a type checker warning in a module accented by a yellow underline, any requiring script will receive the same underline on the same affected row and column. This underline can only be removed by either updating the require
statement or reopening the place.
Repro
-
Open a brand new baseplate
-
Create a module script that has a type checking error:
local var: number = "not a number"
return var
- Create a script that requires the module:
local module = require(workspace.ModuleScript)
- There should be a warning underline in the requiring script in the same row and column as the module script, spanning the same number of characters and containing the same warning message,
W000: Type mismatch number and string
in this case.
Specs
- Windows 10 Home v1903
- CPU: AMD A8-5550M APU with Radeon™ HD Graphics
- Memory: 16.0 GB DDR3
- Roblox Studio Version 0.438.0.407270 (64bit)
Requiring the module from a different script will also cause this behavior to occur over there as long as the module is required from the same address in the data model, so local module = require(workspace.ModuleScript)
will always propagate the same warning in the same location in any script until the place is reopened.
I speculate that this has been happening for at least a few months.
This seems to call attention to another type checker bug where scripts don’t update the types exported from a module whenever said module’s source or location in the data model hierarchy changes. It would be much more favorable for exported types to be updated/checked whenever their module’s source or location changes, including errors for unknown requires.