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
classMethodInjector
@base: Class
def initialize: (Class base) -> voiddef define_safe_instance_method: [U] (String | Symbol name) { (?) -> U } -> voiddef define_safe_singleton_method: [U] (String | Symbol name) { (?) -> U } -> voiddef safe_alias_instance_method: (String | Symbol method_name, String | Symbol alias_name) -> voiddef safe_alias_singleton_method: (String | Symbol method_name, String | Symbol alias_name) -> voidend
And the following code:
# Inject the defined parameter methods into the base {Constraint::BaseConstraint constraint}.## @return [void]definject_parameter_methods!injector=MethodInjector.new(@base)@data.each_keydo |parameter_name|
# @type self: BaseConstraintinjector.define_safe_instance_method(parameter_name){parameters.public_send(parameter_name).value}injector.define_safe_instance_method(:"#{parameter_name}=")do |value|
parameters.public_send(parameter_name).value=valueendinjector.define_safe_instance_method(:"#{parameter_name}_default")doparameters.public_send(parameter_name).defaultendendend
I'm unsure if this should count as a bug or a question. But without the # @type comment I get:
domainic-type/lib/domainic/type/dsl/parameter_builder.rb:149:67: [error] Type `::Domainic::Type::DSL::ParameterBuilder` does not have method `parameters`
│ Diagnostic ID: Ruby::NoMethod
│
└ injector.define_safe_instance_method(parameter_name) { parameters.public_send(parameter_name).value }
~~~~~~~~~~
domainic-type/lib/domainic/type/dsl/parameter_builder.rb:151:14: [error] Type `::Domainic::Type::DSL::ParameterBuilder` does not have method `parameters`
│ Diagnostic ID: Ruby::NoMethod
│
└ parameters.public_send(parameter_name).value = value
~~~~~~~~~~
domainic-type/lib/domainic/type/dsl/parameter_builder.rb:154:14: [error] Type `::Domainic::Type::DSL::ParameterBuilder` does not have method `parameters`
│ Diagnostic ID: Ruby::NoMethod
│
└ parameters.public_send(parameter_name).default
~~~~~~~~~~
Detected 3 problems from 1 file
So my question is how should this singature be defined or is this in fact unexpected behavior from steep?
The text was updated successfully, but these errors were encountered:
Given the following signature:
And the following code:
I get the very verbose output:
steep.log
I'm unsure if this should count as a bug or a question. But without the
# @type
comment I get:So my question is how should this singature be defined or is this in fact unexpected behavior from steep?
The text was updated successfully, but these errors were encountered: