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

Display regression in assignment to composite type field #17123

Closed
omus opened this issue Jun 26, 2016 · 6 comments
Closed

Display regression in assignment to composite type field #17123

omus opened this issue Jun 26, 2016 · 6 comments

Comments

@omus
Copy link
Member

omus commented Jun 26, 2016

While updating the doctests I found, what I believe to be, a regression:

Julia 0.4.6

julia> type Foo
         bar
         baz::Int
         qux::Float64
       end

julia> foo = Foo("Hello, world.", 23, 1.5)
Foo("Hello, world.",23,1.5)

julia> foo.qux = 2
2.0

julia> foo.qux
2.0

Julia 0.5-dev

...

julia> foo.qux = 2  # Should be print 2.0 since `qux` is a Float64 field
2  

julia> foo.qux
2.0

Apologies if this has been discussed elsewhere.

@omus
Copy link
Member Author

omus commented Jun 26, 2016

cc: @tkelman (we discussed this earlier today)

@yuyichao
Copy link
Contributor

The change is a bug fix. a.b = c is supposed to return c.

@yuyichao
Copy link
Contributor

(Also this has nothing to do with displaying....)

Ref #15753 (comment) and #14691

@tkelman
Copy link
Contributor

tkelman commented Jun 26, 2016

whoops, thanks @yuyichao for having a better memory on this one than I did

@StefanKarpinski
Copy link
Sponsor Member

This behavior probably deserves a FAQ entry at this point.

@omus
Copy link
Member Author

omus commented Jun 26, 2016

I've been re-reading the documentation and making corrections. If I find a good spot to mention this behavior I'll add something in.

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

No branches or pull requests

4 participants