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

Incorrect macro implement for missing else with new variables #263

Open
avik-pal opened this issue Nov 11, 2024 · 0 comments · May be fixed by #262
Open

Incorrect macro implement for missing else with new variables #263

avik-pal opened this issue Nov 11, 2024 · 0 comments · May be fixed by #262
Assignees
Labels
bug Something isn't working control flow

Comments

@avik-pal
Copy link
Collaborator

@macroexpand @trace if x > 2
    d = 1
end
quote
    #= /mnt/software/lux/Reactant.jl/lib/ReactantCore/src/ReactantCore.jl:260 =#
    if any(ReactantCore.is_traced, (d, x))
        #= /mnt/software/lux/Reactant.jl/lib/ReactantCore/src/ReactantCore.jl:261 =#
        begin
            #= /mnt/software/lux/Reactant.jl/lib/ReactantCore/src/ReactantCore.jl:242 =#
            var"##true_branch#295" = ((var"##true_branch#295d",)->begin
                        #= /mnt/software/lux/Reactant.jl/lib/ReactantCore/src/ReactantCore.jl:213 =#
                        #= /mnt/software/lux/Reactant.jl/lib/ReactantCore/src/ReactantCore.jl:214 =#
                        begin
                            #= REPL[16]:2 =#
                            var"##true_branch#295d" = 1
                        end
                        #= /mnt/software/lux/Reactant.jl/lib/ReactantCore/src/ReactantCore.jl:215 =#
                        begin
                        end
                        #= /mnt/software/lux/Reactant.jl/lib/ReactantCore/src/ReactantCore.jl:216 =#
                        return (var"##true_branch#295d",)
                    end)
            #= /mnt/software/lux/Reactant.jl/lib/ReactantCore/src/ReactantCore.jl:243 =#
            var"##false_branch#296" = ((var"##false_branch#296d",)->begin
                        #= /mnt/software/lux/Reactant.jl/lib/ReactantCore/src/ReactantCore.jl:231 =#
                        #= /mnt/software/lux/Reactant.jl/lib/ReactantCore/src/ReactantCore.jl:232 =#
                        begin
                            var"##false_branch#296d" = var"##false_branch#296d"
                        end
                        #= /mnt/software/lux/Reactant.jl/lib/ReactantCore/src/ReactantCore.jl:233 =#
                        begin
                        end
                        #= /mnt/software/lux/Reactant.jl/lib/ReactantCore/src/ReactantCore.jl:234 =#
                        return (var"##false_branch#296d",)
                    end)
            #= /mnt/software/lux/Reactant.jl/lib/ReactantCore/src/ReactantCore.jl:244 =#
            (d,) = (ReactantCore.traced_if)(x > 2, var"##true_branch#295", var"##false_branch#296", (d,))
        end
    else
        #= /mnt/software/lux/Reactant.jl/lib/ReactantCore/src/ReactantCore.jl:263 =#
        if x > 2
            #= REPL[16]:2 =#
            d = 1
        end
    end
end
@avik-pal avik-pal added the bug Something isn't working label Nov 11, 2024
@avik-pal avik-pal self-assigned this Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working control flow
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant