# A = A .+ 1 yields different type than A .+= 1; why?

**URL:** https://discourse.julialang.org/t/a-a-1-yields-different-type-than-a-1-why/128189
**Category:** General Usage
**Tags:** type
**Created:** [April 18, 2025, 4:03pm UTC](https://discourse.julialang.org/t/a-a-1-yields-different-type-than-a-1-why/128189 "2025-04-18T16:03:52Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![Joris\_Pinkse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joris_pinkse/32/216398_2.png) [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)
#### Post date: [April 18, 2025, 5:33pm UTC](https://discourse.julialang.org/t/a-a-1-yields-different-type-than-a-1-why/128189/7 "2025-04-18T17:33:33Z")

</div>

Aha!

From [Overload addition assignment += operator - #2 by stevengj](https://discourse.julialang.org/t/overload-addition-assignment-operator/28836/2) I deduced that `x += y`does exactly the same thing as `x = x + y`. This appears to be an exception.

---

_[View the full topic](https://discourse.julialang.org/t/a-a-1-yields-different-type-than-a-1-why/128189)._
