The warning [warning] already initialized constant Foo::A is displayed.
When a class with constants exists in an RBS file that has already been created.
Ruby TypeProf Playground
https://mame.github.io/typeprof-playground/#rb=class+Foo%0A++A+%3D+1%0Aend%0A&rbs=class+Foo%0A++A%3A+Integer%0Aend
Ruby
RBS
Output
# TypeProf 0.15.0
# Errors
test.rb:2: [warning] already initialized constant Foo::A
# Classes
class Foo
A: Integer
end
## Version info:
## * Ruby: 3.0.0
## * RBS: 1.3.1
## * TypeProf: 0.15.0
The warning
[warning] already initialized constant Foo::Ais displayed.When a class with constants exists in an RBS file that has already been created.
Ruby TypeProf Playground
https://mame.github.io/typeprof-playground/#rb=class+Foo%0A++A+%3D+1%0Aend%0A&rbs=class+Foo%0A++A%3A+Integer%0Aend
Ruby
RBS
Output