Skip to content

Commit

Permalink
Merge fa779cc into 31e63e2
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinschmidt committed Sep 28, 2019
2 parents 31e63e2 + fa779cc commit f44b17b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/StatsModels.jl
Expand Up @@ -58,8 +58,8 @@ export
include("traits.jl")
include("contrasts.jl")
include("terms.jl")
include("temporal_terms.jl")
include("schema.jl")
include("temporal_terms.jl")
include("formula.jl")
include("modelframe.jl")
include("statsmodel.jl")
Expand Down
2 changes: 1 addition & 1 deletion src/temporal_terms.jl
Expand Up @@ -26,7 +26,7 @@ struct LeadLagTerm{T<:AbstractTerm, F<:Union{typeof(lead), typeof(lag)}} <: Abst
nsteps::Int
end

function apply_schema(t::FunctionTerm{F}, sch, ctx::Type) where F<:Union{typeof(lead), typeof(lag)}
function apply_schema(t::FunctionTerm{F}, sch::Schema, ctx::Type) where F<:Union{typeof(lead), typeof(lag)}
opname = string(nameof(F.instance))
if length(t.args_parsed) == 1 # lag(term)
term_parsed = first(t.args_parsed)
Expand Down
3 changes: 3 additions & 0 deletions test/ambiguity.jl
@@ -0,0 +1,3 @@
@testset "Ambiguity detection" begin
@test isempty(Test.detect_ambiguities(StatsModels))
end
5 changes: 5 additions & 0 deletions test/extension.jl
Expand Up @@ -93,4 +93,9 @@ end
@testset "Fallback" begin
@test_throws ArgumentError modelcols(DummyTerm(), (a=[1], ))
end

@testset "Ambiguity detection" begin
# ambiguities are introduced by adding additional methods here
@test_broken isempty(Test.detect_ambiguities(StatsModels))
end
end
3 changes: 2 additions & 1 deletion test/runtests.jl
Expand Up @@ -8,7 +8,8 @@ using StatsBase

using StatsModels: ContrastsMatrix

my_tests = ["formula.jl",
my_tests = ["ambiguity.jl",
"formula.jl",
"terms.jl",
"temporal_terms.jl",
"schema.jl",
Expand Down

0 comments on commit f44b17b

Please sign in to comment.