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

inference: follow #40985, special case _typeof_captured_variable #43965

Merged
merged 2 commits into from
Jan 28, 2022

Conversation

aviatesk
Copy link
Sponsor Member

Copy link
Member

@simeonschaub simeonschaub left a comment

Choose a reason for hiding this comment

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

This is great! I am happy we don't need a special version of _typeof_captured_variable in Core.Compiler anymore. I guess the hang @tkf originally reported in #35970 might have just been some kind of bad recursion when bootstrapping?

@@ -588,7 +588,7 @@ isdispatchtuple(@nospecialize(t)) = (@_pure_meta; isa(t, DataType) && (t.flags &

iskindtype(@nospecialize t) = (t === DataType || t === UnionAll || t === Union || t === typeof(Bottom))
isconcretedispatch(@nospecialize t) = isconcretetype(t) && !iskindtype(t)
using Core: has_free_typevars
import Core: has_free_typevars
Copy link
Member

Choose a reason for hiding this comment

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

Any particular reason for this change? has_free_typevars should not be overloadable anyways, right?

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

ah, that's just because I'm almost always using import just because of #36529.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, makes sense

@simeonschaub simeonschaub merged commit 94bf526 into sds/tkf/type-capturing Jan 28, 2022
@simeonschaub simeonschaub deleted the avi/follow40985 branch January 28, 2022 23:09
simeonschaub pushed a commit that referenced this pull request Dec 9, 2022
skip type capturing in Core.Compiler

Use Base.C_NULL

rename to `_typeof_captured_variable`

Use `_typeof_captured_variable = Core.Typeof`

fix case of captured types with free typevars

make `has_free_typevars` a builtin

and add inference support

fix tests

add some more tests

some more inference fixes

inference: follow #40985, special case `_typeof_captured_variable` (#43965)

* Revert "make `has_free_typevars` a builtin"

This reverts commit 3d0bffc.

* inference: follow #40985, special case `_typeof_captured_variable`

Update base/reflection.jl
simeonschaub pushed a commit that referenced this pull request Oct 25, 2023
skip type capturing in Core.Compiler

Use Base.C_NULL

rename to `_typeof_captured_variable`

Use `_typeof_captured_variable = Core.Typeof`

fix case of captured types with free typevars

make `has_free_typevars` a builtin

and add inference support

fix tests

add some more tests

some more inference fixes

inference: follow #40985, special case `_typeof_captured_variable` (#43965)

* Revert "make `has_free_typevars` a builtin"

This reverts commit 3d0bffc.

* inference: follow #40985, special case `_typeof_captured_variable`

Update base/reflection.jl
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.

None yet

2 participants