https://issues.dlang.org/show_bug.cgi?id=17474
Tomer Filiba (weka) <to...@weka.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |industry CC| |to...@weka.io --- Comment #1 from Tomer Filiba (weka) <to...@weka.io> --- I would like to elaborate a little. The existence/absence of a @property doesn't matter here. The thing is, the compiler first tries to lower `foo = bar` to `foo(bar)`. If it doesn't work, it will try `foo() = bar` which is what we expect. However, in the case of `foo = null`, the lowering to `foo(null)` does match because you can pass `null` for a string. So, depending on the *value* I'm assigning, it will choose different code paths, even though I'm expecting only the second behavior. This bug was caught in a UT, but figuring it out required I look at the generated assembly because it was impossible to understand otherwise. I don't know what's the "right semantics" here. It's basically the interaction of several different features that cause this, but I definitely know it's not what I expect from looking at the code. --