Sha256: 5cb0566ef01be64a3167d4e2a51a7d3761230c0f0b11190afa8a90b07953e49b

Contents?: true

Size: 456 Bytes

Versions: 7

Compression:

Stored size: 456 Bytes

Contents

def foo(x)
end

foo(UNDEFINED_CONSTANT)
foo(1)

C = "dummy"
class C
  def foo
  end
  self.new.foo
end

BAR = 1
BAR = "str"
def log(x)
end
log(BAR)

__END__
# Errors
smoke/constant2.rb:8: [error] the class "C" is String
smoke/constant2.rb:15: [warning] already initialized constant Object::BAR

# Classes
class Object
  C : String
  BAR : String
  def foo : (Integer | untyped) -> nil
  def log : (String) -> nil
end

class C(dummy)
  def foo : -> nil
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
typeprof-0.5.3 smoke/constant2.rb
typeprof-0.5.2 smoke/constant2.rb
typeprof-0.5.1 smoke/constant2.rb
typeprof-0.5.0 smoke/constant2.rb
typeprof-0.4.2 smoke/constant2.rb
typeprof-0.4.1 smoke/constant2.rb
typeprof-0.4.0 smoke/constant2.rb