Skip to content

Conversation

@KristofferC
Copy link
Member

This was added in 8f08a1f to fix #13021 but it doesn't seem to be needed anymore.

Fixes #33347.

@JeffBezanson
Copy link
Member

Since Module doesn't have usable fields (via getfield etc.) I suspect fieldtypes and fieldnames should return ().

@vtjnash
Copy link
Member

vtjnash commented Feb 18, 2020

That fact seems a bit muddy, since it does have usable fields via getfield, but we call the listing of them propertynames (or names) instead of fieldnames:

julia> getfield(Main, :Main)
Main

julia> propertynames(Main)
5-element Array{Symbol,1}:
...

@vtjnash
Copy link
Member

vtjnash commented Feb 18, 2020

Also, FWIW, we have now:

julia> fieldnames(Module)
(:name, :parent)

julia> fieldcount(Module)
2

So this PR would currently give also give the corresponding type of that pair (Symbol, Module) too

@JeffBezanson
Copy link
Member

I guess fieldtypes isn't the most harmful of that lot, but I think they're all pretty misleading.

@JeffBezanson JeffBezanson merged commit 41f07ac into master Feb 20, 2020
@JeffBezanson JeffBezanson deleted the kc/remove_error branch February 20, 2020 20:55
birm pushed a commit to birm/julia that referenced this pull request Feb 22, 2020
vtjnash added a commit that referenced this pull request Sep 18, 2020
The fields are not accessible, so it is awkward to report they exist.

Fixes #37630
Caused issues starting with #34804
JeffBezanson pushed a commit that referenced this pull request Sep 21, 2020
The fields are not accessible, so it is awkward to report they exist.

Fixes #37630
Caused issues starting with #34804
NHDaly pushed a commit to NHDaly/julia that referenced this pull request Jan 21, 2021
The fields are not accessible, so it is awkward to report they exist.

Fixes JuliaLang#37630
Caused issues starting with JuliaLang#34804
Sacha0 pushed a commit that referenced this pull request Jan 21, 2021
The fields are not accessible, so it is awkward to report they exist.

Fixes #37630
Caused issues starting with #34804
vchuravy pushed a commit that referenced this pull request Jan 22, 2021
The fields are not accessible, so it is awkward to report they exist.

Fixes #37630
Caused issues starting with #34804
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.

Strange error when querying fieldtype of Module Error message regression "type Module has no field val"

4 participants