Skip to content

Commit

Permalink
Add Symbol#=~ test with Steep
Browse files Browse the repository at this point in the history
  • Loading branch information
soutaro committed Jul 25, 2024
1 parent bc628bd commit 6d56108
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/typecheck/symbol_match/Steepfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
D = Steep::Diagnostic

target :test do
signature "."
check "."
configure_code_diagnostics(D::Ruby.all_error)
end
3 changes: 3 additions & 0 deletions test/typecheck/symbol_match/a.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class CustomMatcher
def =~: (String) -> bool
end
3 changes: 3 additions & 0 deletions test/typecheck/symbol_match/match.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
a = (:foo =~ /a/) #: Integer?

b = (:foo =~ CustomMatcher.new) #: bool

0 comments on commit 6d56108

Please sign in to comment.