Open gwillcox-r7 opened 1 year ago
Does anyone know how to skip past this file?
I tried the following exclusion patterns:
exclude:
- "*/**/Pointer.c"
- "ext/ffi_c/Pointer.c"
- "ffi_c/Pointer.c"
- "Pointer.c"
This patch should fix it
diff --git a/lib/solargraph/complex_type.rb b/lib/solargraph/complex_type.rb
index 32574ec8..89dfaa6c 100644
--- a/lib/solargraph/complex_type.rb
+++ b/lib/solargraph/complex_type.rb
@@ -169,7 +169,7 @@ module Solargraph
paren_stack = 0
base = String.new
subtype_string = String.new
- type_string.each_char do |char|
+ type_string&.each_char do |char|
if char == '='
#raise ComplexTypeError, "Invalid = in type #{type_string}" unless curly_stack > 0
elsif char == '<'
+1 on this issue!
Upgrading ffi to 1.16.2 fixed this issue for me.
When running
solargraph scan
using the latest code frommaster
I end up with the following crash when scanning code:Looks like somehow
type_string
is becoming an object in the block that does not have the.each_char
method associated with that object.