# typed: true

class R; end
R = 5 # error: Cannot initialize the class `R` by constant assignment
class R; end
# even though we've reopened the class here, the constant R still
# "wins", because the first definition of the class is what counts

# The static field never mangles the class definition, so this is allowed
x = R.new
# this resolves as the class, so this will be an error
puts R + 1 # error: Method `+` does not exist on `T.class_of(R)`
