-
Notifications
You must be signed in to change notification settings - Fork 41
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
descend doesn't work with constructor for sumtype in Expronicon #470
Comments
@Zentrik, with timholy/CodeTracking.jl#120 I now get: julia> @descend Material.Lambertian()
(var"##adt_type"::var"Material#Type")(args...) @ Main ~/.julia/packages/Expronicon/7EBrJ/src/adt/emit.jl:429
429 function ($adt_type::$(info.typename))($args::Tuple{}...; $kwargs...)::Material
430 isempty($args) || return $(def.name)($adt_type, $args...)
431 $(codegen_ast(kwarg_body))
432 end
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [w]arn, [h]ide type-stable statements, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
• %2 = NamedTuple()::Core.Const(NamedTuple())
%3 = pairs(::NamedTuple{(), Tuple{}})::Core.Const(Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}())
%5 = #_#3(::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}},::var"Material#Type")::Material Obviously there's no useful matching that can be done here. Should we scan for |
I think a warning would be useful as it wasn't particularly obvious to me that this was metaprogramming. Is |
I'd say it is metaprogramming via the |
throws error
The text was updated successfully, but these errors were encountered: