You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we don't want to pollute the global namespace, is there a way to annotate methods using the deferred syntax? The obvious thing didn't work:
$ cat /tmp/file.rb
require 'rdl'
RDL.type '() -> NilClass'
def foo; end
$ ruby /tmp/file.rb
/Users/pt/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rdl-2.1.0/lib/rdl/wrap.rb:213:in `block in do_method_added': Deferred type contract from class RDL being applied in class Object to foo (RuntimeError)
from /Users/pt/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rdl-2.1.0/lib/rdl/wrap.rb:206:in `each'
from /Users/pt/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rdl-2.1.0/lib/rdl/wrap.rb:206:in `do_method_added'
from /Users/pt/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rdl-2.1.0/lib/rdl/wrap.rb:623:in `method_added'
from /tmp/file.rb:4:in `<main>'
The text was updated successfully, but these errors were encountered:
If we don't want to pollute the global namespace, is there a way to annotate methods using the deferred syntax? The obvious thing didn't work:
The text was updated successfully, but these errors were encountered: