mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Prevent ugly "has no type" errors
This commit is contained in:
parent
12eeb02a8d
commit
554e215898
1 changed files with 1 additions and 0 deletions
|
@ -68,6 +68,7 @@ module Spectator
|
|||
arguments = ::Spectator::Arguments.capture({{call.args.splat(", ")}}{% if call.named_args %}{{call.named_args.splat}}{% end %})
|
||||
call = ::Spectator::MethodCall.new({{call.name.symbolize}}, arguments)
|
||||
raise ::Spectator::UnexpectedMessage.new("#{_spectator_double_name} received unexpected message :{{call.name}} with #{arguments}")
|
||||
nil # Necessary for compiler to infer return type as nil. Avoids runtime "can't execute ... `x` has no type errors".
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue