dbremner / rubydotnetcompiler

Automatically exported from code.google.com/p/rubydotnetcompiler
0 stars 0 forks source link

Accessing constants on an instance raises InvalidCastException instead of TypeError #17

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
## Adapted from IronRuby tests: Runtime\Class\test_const.rb

class Foo
    CONST = 1
end

f = Foo.new
puts f::CONST     ## should raise TypeError

The attempt to access CONST on an instance should raise a TypeError, but
instead we get a System.InvalidCastException.

Original issue reported on code.google.com by meaningi...@gmail.com on 30 Aug 2007 at 5:27

GoogleCodeExporter commented 8 years ago

Original comment by DrWayneK...@gmail.com on 14 Sep 2007 at 5:42