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

implement splatnew #125

Merged
merged 3 commits into from
Jun 29, 2019
Merged

implement splatnew #125

merged 3 commits into from
Jun 29, 2019

Conversation

vchuravy
Copy link
Member

@vchuravy vchuravy commented May 16, 2019

JuliaLang/julia#30577 introduced Expr(:splatnew), causing #124

This is nearly there, except that I haven't figured out what I need to do for metametadata..., @jrevels maybe we also want to unify the implementation of tagged_new and tagged_splatnew

 Error During Test at /home/vchuravy/src/Cassette/test/misctaggingtests.jl:264
  Test threw exception
  Expression: overdub(ctx, (_y->begin
                kwargtest(3; y=_y)
            end), tag(2, ctx)) === 5
  MethodError: Cannot `convert` an object of type Tuple{Cassette.Immutable{Cassette.Meta{Cassette.NoMetaData,Cassette.NoMetaMeta}}} to an object of type Cassette.NoMetaMeta
  Closest candidates are:
    convert(::Type{T}, !Matched::T) where T at essentials.jl:167
  Stacktrace:
   [1] _metametaconvert(::Type, ::Tuple{Cassette.Immutable{Cassette.Meta{Cassette.NoMetaData,Cassette.NoMetaMeta}}}) at /home/vchuravy/src/Cassette/src/tagging.jl:39
   [2] convert at /home/vchuravy/src/Cassette/src/tagging.jl:56 [inlined]
   [3] macro expansion at /home/vchuravy/src/Cassette/src/tagging.jl:521 [inlined]
   [4] tagged_splatnew(::Cassette.Context{nametype(KwargCtx),Nothing,Cassette.Tag{nametype(KwargCtx),0xfddc2783aa6f0228,Nothing},getfield(Cassette, Symbol("##PassType#375")),IdDict{Module,Dict{Symbol,Cassette.BindingMeta}},Nothing}, ::Type{NamedTuple{(:y,),Tuple{Int64}}}, ::Tagged{Cassette.Tag{nametype(KwargCtx),0xfddc2783aa6f0228,Nothing},Tuple{Int64},Cassette.NoMetaData,Tuple{Cassette.Immutable{Cassette.Meta{Cassette.NoMetaData,Cassette.NoMetaMeta}}},Cassette.Context{nametype(KwargCtx),Nothing,Cassette.Tag{nametype(KwargCtx),0xfddc2783aa6f0228,Nothing},getfield(Cassette, Symbol("##PassType#375")),IdDict{Module,Dict{Symbol,Cassette.BindingMeta}},Nothing}}) at /home/vchuravy/src/Cassette/src/tagging.jl:497
   [5] overdub(::Cassette.Context{nametype(KwargCtx),Nothing,Cassette.Tag{nametype(KwargCtx),0xfddc2783aa6f0228,Nothing},getfield(Cassette, Symbol("##PassType#375")),IdDict{Module,Dict{Symbol,Cassette.BindingMeta}},Nothing}, ::Type{NamedTuple{(:y,),Tuple{Int64}}}, ::Tagged{Cassette.Tag{nametype(KwargCtx),0xfddc2783aa6f0228,Nothing},Tuple{Int64},Cassette.NoMetaData,Tuple{Cassette.Immutable{Cassette.Meta{Cassette.NoMetaData,Cassette.NoMetaMeta}}},Cassette.Context{nametype(KwargCtx),Nothing,Cassette.Tag{nametype(KwargCtx),0xfddc2783aa6f0228,Nothing},getfield(Cassette, Symbol("##PassType#375")),IdDict{Module,Dict{Symbol,Cassette.BindingMeta}},Nothing}}) at ./boot.jl:553
   [6] overdub(::Cassette.Context{nametype(KwargCtx),Nothing,Cassette.Tag{nametype(KwargCtx),0xfddc2783aa6f0228,Nothing},getfield(Cassette, Symbol("##PassType#375")),IdDict{Module,Dict{Symbol,Cassette.BindingMeta}},Nothing}, ::Type{NamedTuple{(:y,),T} where T<:Tuple}, ::Tagged{Cassette.Tag{nametype(KwargCtx),0xfddc2783aa6f0228,Nothing},Tuple{Int64},Cassette.NoMetaData,Tuple{Cassette.Immutable{Cassette.Meta{Cassette.NoMetaData,Cassette.NoMetaMeta}}},Cassette.Context{nametype(KwargCtx),Nothing,Cassette.Tag{nametype(KwargCtx),0xfddc2783aa6f0228,Nothing},getfield(Cassette, Symbol("##PassType#375")),IdDict{Module,Dict{Symbol,Cassette.BindingMeta}},Nothing}}) at ./boot.jl:549
   [7] #145 at ./none:0 [inlined]
   [8] overdub(::Cassette.Context{nametype(KwargCtx),Nothing,Cassette.Tag{nametype(KwargCtx),0xfddc2783aa6f0228,Nothing},getfield(Cassette, Symbol("##PassType#375")),IdDict{Module,Dict{Symbol,Cassette.BindingMeta}},Nothing}, ::getfield(Main, Symbol("##145#146")), ::Tagged{Cassette.Tag{nametype(KwargCtx),0xfddc2783aa6f0228,Nothing},Int64,Cassette.NoMetaData,Cassette.NoMetaMeta,Cassette.Context{nametype(KwargCtx),Nothing,Cassette.Tag{nametype(KwargCtx),0xfddc2783aa6f0228,Nothing},getfield(Cassette, Symbol("##PassType#375")),IdDict{Module,Dict{Symbol,Cassette.BindingMeta}},Nothing}}) at /home/vchuravy/src/Cassette/src/overdub.jl:0
   [9] top-level scope at /home/vchuravy/src/Cassette/test/misctaggingtests.jl:264
   [10] include at ./boot.jl:328 [inlined]
   [11] include_relative(::Module, ::String) at ./loading.jl:1094
   [12] include(::Module, ::String) at ./Base.jl:31
   [13] include(::String) at ./client.jl:431
   [14] top-level scope at /home/vchuravy/src/Cassette/test/runtests.jl:14
   [15] top-level scope at /home/vchuravy/builds/julia/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1113
   [16] top-level scope at /home/vchuravy/src/Cassette/test/runtests.jl:14
   [17] top-level scope at util.jl:156

@vchuravy vchuravy requested a review from jrevels May 16, 2019 12:04
@jrevels jrevels merged commit f4fd6c1 into master Jun 29, 2019
@jrevels jrevels deleted the vc/splatnew branch June 29, 2019 21:26
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