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

Improve error message when type uses old Tuple format #11278

Closed
dlfivefifty opened this issue May 15, 2015 · 3 comments
Closed

Improve error message when type uses old Tuple format #11278

dlfivefifty opened this issue May 15, 2015 · 3 comments
Labels
bug Indicates an unexpected problem or unintended behavior error handling Handling of exceptions by Julia or the user

Comments

@dlfivefifty
Copy link
Contributor

I spent days tracking down a bug, which turned out to be due to the (S,V) instead of Tuple{S,V} in a type definition:

immutable KroneckerOperator{S,V,DS,RS,T}<: BivariateOperator{T}
ops::(S,V)
domainspace::DS
rangespace::RS
end

The error message gave no hint that the issue was inside KroneckerOperator: it appeared while trying to compile a function that didn't have anything to do with KroneckerOperator. Here is the error message.

TypeError: subtype: expected Type{T}, got Tuple{TypeVar,TypeVar}
in abstract_call_gf at ./inference.jl:586
in abstract_call at ./inference.jl:857
in abstract_eval_call at ./inference.jl:904
in abstract_eval at ./inference.jl:931
in abstract_eval_call at ./inference.jl:881
in abstract_eval at ./inference.jl:931
in abstract_eval_call at ./inference.jl:881
in abstract_eval at ./inference.jl:931
in typeinf_uncached at ./inference.jl:1591
in typeinf at ./inference.jl:1307
in typeinf at ./inference.jl:1257
in abstract_call_gf at ./inference.jl:696
in abstract_call at ./inference.jl:857
in abstract_eval_call at ./inference.jl:904
in abstract_eval at ./inference.jl:931
in abstract_eval_call at ./inference.jl:881
in abstract_eval at ./inference.jl:931
in typeinf_uncached at ./inference.jl:1591
in typeinf at ./inference.jl:1307
in typeinf at ./inference.jl:1257
in abstract_call_gf at ./inference.jl:696
in abstract_call at ./inference.jl:857
in abstract_eval_call at ./inference.jl:904
in abstract_eval at ./inference.jl:931
in abstract_eval_call at ./inference.jl:881
in abstract_eval at ./inference.jl:931
in typeinf_uncached at ./inference.jl:1591
in typeinf at ./inference.jl:1307
in typeinf at ./inference.jl:1257
in abstract_call_gf at ./inference.jl:696
in abstract_call at ./inference.jl:857
in abstract_eval_call at ./inference.jl:904
in abstract_eval at ./inference.jl:931
in abstract_interpret at ./inference.jl:1080
in typeinf_uncached at ./inference.jl:1518
in typeinf at ./inference.jl:1307
in typeinf at ./inference.jl:1257
in abstract_call_gf at ./inference.jl:696
in abstract_call at ./inference.jl:857
in abstract_call at ./inference.jl:817
in abstract_eval_call at ./inference.jl:904
in abstract_eval at ./inference.jl:931
in typeinf_uncached at ./inference.jl:1591
in typeinf at ./inference.jl:1307
in typeinf at ./inference.jl:1257
in abstract_call_gf at ./inference.jl:696
in abstract_call at ./inference.jl:857
in abstract_call at ./inference.jl:817
in abstract_eval_call at ./inference.jl:904
in abstract_eval at ./inference.jl:931
in abstract_eval_call at ./inference.jl:881
in abstract_eval at ./inference.jl:931
in typeinf_uncached at ./inference.jl:1591
in typeinf at ./inference.jl:1307
in typeinf at ./inference.jl:1257
in abstract_call_gf at ./inference.jl:696
in abstract_call at ./inference.jl:857
in abstract_eval_call at ./inference.jl:904
in abstract_eval at ./inference.jl:931
in typeinf_uncached at ./inference.jl:1591
in typeinf at ./inference.jl:1307
in typeinf at ./inference.jl:1257
in abstract_call_gf at ./inference.jl:696
in abstract_call at ./inference.jl:857
in abstract_eval_call at ./inference.jl:904
in abstract_eval at ./inference.jl:931
in abstract_interpret at ./inference.jl:1080
in typeinf_uncached at ./inference.jl:1518
in typeinf at ./inference.jl:1307
in typeinf at ./inference.jl:1257
in abstract_call_gf at ./inference.jl:696
in abstract_call at ./inference.jl:857
in abstract_eval_call at ./inference.jl:904
in abstract_eval at ./inference.jl:931
in abstract_interpret at ./inference.jl:1080
in typeinf_uncached at ./inference.jl:1518
in typeinf at ./inference.jl:1307
in typeinf at ./inference.jl:1257
in abstract_call_gf at ./inference.jl:696
in abstract_call at ./inference.jl:857
in abstract_eval_call at ./inference.jl:904
in abstract_eval at ./inference.jl:931
in typeinf_uncached at ./inference.jl:1591
in typeinf at ./inference.jl:1307
in typeinf_ext at ./inference.jl:1251
in linsolve at /Users/solver/.julia/v0.4/ApproxFun/src/Operators/linsolve.jl:108
in linsolve at /Users/solver/.julia/v0.4/ApproxFun/src/Operators/linsolve.jl:126
in linsolve at /Users/solver/.julia/v0.4/ApproxFun/src/Operators/linsolve.jl:130
in ./ at /Users/solver/.julia/v0.4/ApproxFun/src/Extras/specialfunctions.jl:89

@jiahao
Copy link
Member

jiahao commented May 15, 2015

Special case of #11200?

@dlfivefifty
Copy link
Contributor Author

I don't think it's a special case, because it's invalid type syntax rather than deprecated type

Sent from my iPhone

On 15 May 2015, at 12:14 pm, Jiahao Chen [email protected] wrote:

Special case of #11200?


Reply to this email directly or view it on GitHub.

@ihnorton ihnorton added error handling Handling of exceptions by Julia or the user bug Indicates an unexpected problem or unintended behavior labels May 18, 2015
@ihnorton
Copy link
Member

Nominating for bug because that's not a very actionable error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior error handling Handling of exceptions by Julia or the user
Projects
None yet
Development

No branches or pull requests

3 participants