Class variables may not be set in class bodies #76

Closed
technomancy opened this Issue Mar 28, 2011 · 1 comment

Comments

Projects
None yet
1 participant
Contributor

technomancy commented Mar 28, 2011

class Foo
  @@bar = "hi"

  def say_hello
    puts @@hi
  end
end

Inference Error:
foo.mirah:5: Unable to infer type.
puts @@hi
^^^^^

Would sure make class variables more useful.

@ghost

ghost commented Sep 13, 2011

Works

puts @@bar

Does not work

puts @@hi

@ribrdb ribrdb closed this in 7962d91 May 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment