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

No overload matches with argument NoReturn #7760

Closed
wooster0 opened this issue May 9, 2019 · 0 comments · Fixed by #7761
Closed

No overload matches with argument NoReturn #7760

wooster0 opened this issue May 9, 2019 · 0 comments · Fixed by #7761

Comments

@wooster0
Copy link
Contributor

wooster0 commented May 9, 2019

record A, argument : UInt64

variable1 = "hello"

if variable1.is_a?(UInt64)
  variable2 = variable1
end

exit if variable2.nil?

A.new(argument: variable2)
Error in line 11: no overload matches 'A.new', argument: NoReturn
Overloads are:
 - A.new(argument : UInt64)

I don't think variable2's type should be NoReturn here.
But now if I remove argument: from the last line (so A.new(variable2)), no compile-time error happens, but I expect the same to happen since A.new(variable2) and A.new(argument: variable2) should normally do the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants