test.rb:10: [error] no argument for required keywords
test.rb:14: [error] no argument for required keywords
...
attr_reader age : untyped
ruby
class User
def initialize name: 'ko1', age: 10
@name = name
@age = age
end
attr_reader :name, :age
end
def hello_message
"Helo, " + User.new.name
end
def wrong_type_demo
"Age is " + User.new.age
end
rbs
output
# Errors
test.rb:10: [error] no argument for required keywords
test.rb:14: [error] no argument for required keywords
# Classes
class Object
def hello_message : -> String
def wrong_type_demo : -> String
end
class User
attr_reader name : String
attr_reader age : untyped
def initialize : (?name: untyped, ?age: Integer) -> untyped
end
## Version info:
## * Ruby: 2.7.1
## * RBS: 0.14.0
## * TypeProf: 0.2.1
Issue
Why that?
ruby
rbs
output