Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ruby-signature #120

Merged
merged 3 commits into from
Feb 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion smoke/alias/a.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# @type var x: foo
x = ""

# !expects ArgumentTypeMismatch: receiver=(::Integer | ::String), expected=::String, actual=::Integer
# !expects ArgumentTypeMismatch: receiver=(::Integer | ::String), expected=::string, actual=::Integer
x + 123

# @type var y: bar
Expand Down
8 changes: 4 additions & 4 deletions smoke/regexp/b.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
match_ref_3.foo

match_ref_4 = match[0, 1]
# !expects NoMethodError: type=::Array[::String], method=foo
# !expects NoMethodError: type=::Array[(::String | nil)], method=foo
match_ref_4.foo

match_ref_5 = match[0..1]
# !expects NoMethodError: type=::Array[::String], method=foo
# !expects NoMethodError: type=::Array[(::String | nil)], method=foo
match_ref_5.foo

begin_1 = match.begin(0)
Expand All @@ -32,7 +32,7 @@
begin_3.foo

captures_1 = match.captures
# !expects NoMethodError: type=::Array[::String], method=foo
# !expects NoMethodError: type=::Array[(::String | nil)], method=foo
captures_1.foo

end_1 = match.end(0)
Expand Down Expand Up @@ -92,7 +92,7 @@
string_1.foo

to_a_1 = match.to_a
# !expects NoMethodError: type=::Array[::String], method=foo
# !expects NoMethodError: type=::Array[(::String | nil)], method=foo
to_a_1.foo

values_at_1 = match.values_at
Expand Down
6 changes: 3 additions & 3 deletions test/type_factory_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def test_union_type
assert_overload_including c, "(::Integer) -> ::Integer", "(::Float) -> ::Float"
end
assert_any! combination.types do |c|
assert_overload_with c, "(::String) -> ::String"
assert_overload_with c, "(::string) -> ::String"
end
end

Expand Down Expand Up @@ -457,7 +457,7 @@ def test_intersection_type
assert_overload_including c, "(::Integer) -> ::Integer", "(::Float) -> ::Float"
end
assert_any! combination.types do |c|
assert_overload_including c, "(::String) -> ::String"
assert_overload_including c, "(::string) -> ::String"
end
end

Expand All @@ -466,7 +466,7 @@ def test_intersection_type
end

interface.methods[:end_with?].yield_self do |combination|
assert_overload_including combination, "(*::String) -> bool"
assert_overload_including combination, "(*::string) -> bool"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion vendor/ruby-signature