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

Bump versions #42

Merged
merged 4 commits into from
Feb 2, 2021
Merged

Bump versions #42

merged 4 commits into from
Feb 2, 2021

Conversation

vchuravy
Copy link
Member

@vchuravy vchuravy commented Feb 2, 2021

No description provided.

@@ -86,11 +86,23 @@ Create the `FunctionSpec` pair, and lookup the primal return type.

# can't return array since that's complicated.
rt = Core.Compiler.return_type(Cassette.overdub, overdub_tt)
@assert rt<:Union{AbstractFloat, Nothing}
if !(rt<:Union{AbstractFloat, Nothing})
@error "Return type should be <:Union{Nothing, AbstractFloat}" rt adjoint primal
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a nice way to test this per chance via Julia exception handling?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The right thing to do is to define a custom exception. And then test for that.

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

Successfully merging this pull request may close these issues.

2 participants