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

strange code_warntype output #31764

Open
JeffBezanson opened this issue Apr 18, 2019 · 2 comments
Open

strange code_warntype output #31764

JeffBezanson opened this issue Apr 18, 2019 · 2 comments

Comments

@JeffBezanson
Copy link
Member

julia> function g end;

julia> f() = g();

julia> @code_warntype f()
Variables
  #self#::Core.Compiler.Const(f, false)

Body::Union{}
1 ─     Main.g()
└──     Core.Compiler.Const(:(return %1), false)

Const(:(return %1)) should not be there.

@Keno
Copy link
Member

Keno commented Apr 18, 2019

This happens when inference doesn't explore some code paths. For some reason the rest of that code path will get wrapped in Const()

@vtjnash
Copy link
Member

vtjnash commented Apr 18, 2019

Yeah, it should probably use something like Expr(:unreachable, ...) there instead

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