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 97e5fbc
Show file tree
Hide file tree
Showing 3 changed files with 14 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
4 changes: 4 additions & 0 deletions test/typecheck/symbol_match/a.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# A custome matcher that implements String::_MatchAgainst[String, bool]
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 @@
(:foo =~ /a/) #: Integer?

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

0 comments on commit 97e5fbc

Please sign in to comment.