We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5fac5dd commit 204c4e0Copy full SHA for 204c4e0
1 file changed
lib/solargraph/complex_type.rb
@@ -161,7 +161,13 @@ def namespaces
161
# @param [Array<Object>] args
162
def method_missing name, *args, &block
163
return if @items.first.nil?
164
- return @items.first.send(name, *args, &block) if @items.first.respond_to?(name)
+ if @items.first.respond_to?(name)
165
+ if @items.count > 1
166
+ Solargraph.assert_or_log(:complex_type_method_missing,
167
+ "ComplexType being used as UniqueType: delegating #{name} to #{self.class} with items #{@items.map(&:to_s).join(', ')}")
168
+ end
169
+ return @items.first.send(name, *args, &block)
170
171
super
172
end
173
0 commit comments