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

Returning CodeInfo from @generated requires explicit return #26296

Closed
maleadt opened this issue Mar 2, 2018 · 1 comment
Closed

Returning CodeInfo from @generated requires explicit return #26296

maleadt opened this issue Mar 2, 2018 · 1 comment

Comments

@maleadt
Copy link
Member

maleadt commented Mar 2, 2018

Repro:

foobar(i) = i
@generated foo(i) = return first(code_lowered(foobar, Tuple{i}))
@generated bar(i) =        first(code_lowered(foobar, Tuple{i}))
foobar(42) = 42
foo(42) = 42
bar(42) = CodeInfo(:(begin
      nothing
      return i
  end))
@Keno
Copy link
Member

Keno commented Mar 2, 2018

#25678

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

No branches or pull requests

3 participants