Skip to content

Conversation

@JeffBezanson
Copy link
Member

fixes #31803

@JeffBezanson JeffBezanson added bugfix This change fixes an existing bug compiler:inference Type inference backport 1.2 labels Apr 26, 2019
@JeffBezanson JeffBezanson requested a review from vtjnash April 26, 2019 20:21
end

exactft = exact || !has_free_typevars(ft)
exactft = exact || (!has_free_typevars(ft) && u.name !== Tuple.name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem specific to the typevar case?

julia> Core.Compiler.fieldtype_tfunc(Type{Tuple{Any}}, Const(1))
Const(Any, false)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fieldtype(Tuple{Any}, 1) does return Any, so I think that result is ok.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, right

@vtjnash
Copy link
Member

vtjnash commented Apr 27, 2019

I suggest also applying the same fix on line 909:

    exactft1 = exact || (!has_free_typevars(ft1) && u.name !== Tuple.name)

@JeffBezanson JeffBezanson merged commit a78f895 into master Apr 28, 2019
@JeffBezanson JeffBezanson deleted the jb/fix31803 branch April 28, 2019 19:10
KristofferC pushed a commit that referenced this pull request May 9, 2019
@KristofferC KristofferC mentioned this pull request May 9, 2019
58 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This change fixes an existing bug compiler:inference Type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fatal error in type inference in StatsModels

5 participants