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
Class A
include Contracts::Core
include Contracts::Builtin
Contract Integer, Integer => String
def self.hello
return "Hello world!"
end
end
puts A.hello
Actual behavior
No errors are raised
Expected behavior
I would expect this would an error, because the contract specifies hello takes two integers as arguments, and it is being passed none. I understand that this could be considered fine, as the code would work fine (without type errors) without the contract, but that is no different from any other incorrectly specified contract.
The text was updated successfully, but these errors were encountered:
Example code:
Actual behavior
No errors are raised
Expected behavior
I would expect this would an error, because the contract specifies
hello
takes two integers as arguments, and it is being passed none. I understand that this could be considered fine, as the code would work fine (without type errors) without the contract, but that is no different from any other incorrectly specified contract.The text was updated successfully, but these errors were encountered: