Skip to content

Commit 1ed7ca6

Browse files
committed
Fixed [error] Cannot pass a value of type (:ref | :raw | nil) as an argument of type (:ref | nil)
``` lib/ruby_header_parser/parser.rb:223:57: [error] Cannot pass a value of type `(:ref | :raw | nil)` as an argument of type `(:ref | nil)` │ (:ref | :raw | nil) <: (:ref | nil) │ :raw <: (:ref | nil) │ :raw <: :ref │ │ Diagnostic ID: Ruby::ArgumentTypeMismatch │ └ TyperefDefinition.new(type: typeref_type, pointer: typeref_pointer) ~~~~~~~~~~~~~~~ ```
1 parent 7ce2dcf commit 1ed7ca6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/ruby_header_parser/typeref_definition.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ class TyperefDefinition
88
attr_accessor :type
99

1010
# @!attribute pointer
11-
# @return [Symbol,nil]
11+
# @return [Symbol,nil] :ref, :raw
1212
attr_accessor :pointer
1313

1414
# @param type [String]
15-
# @param pointer [Symbol,nil] :ref
15+
# @param pointer [Symbol,nil] :ref, :raw
1616
def initialize(type:, pointer: nil)
1717
@type = type
1818
@pointer = pointer

sig/ruby_header_parser/typeref_definition.rbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module RubyHeaderParser
22
class TyperefDefinition
33
attr_accessor type: String
4-
attr_accessor pointer: :ref | nil
4+
attr_accessor pointer: :ref | :raw | nil
55

6-
def initialize: (type: String, pointer: (:ref)?) -> void
6+
def initialize: (type: String, pointer: (:ref | :raw)?) -> void
77

88
def ==: (untyped other) -> bool
99

0 commit comments

Comments
 (0)