April 23, 2017 [Issue 17343] class.init.<symbol> does not working | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=17343 ag0aep6g@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |ag0aep6g@gmail.com Resolution|--- |INVALID --- Comment #1 from ag0aep6g@gmail.com --- (In reply to Andrey from comment #0) > > class B { > > int b = 10; > > } > > > > assert(B.init.b == 10); // exited abnormally with code 2 This works as expected. `B.init` is null. When you dereference null the program will crash because it's not allowed to read from there. An error message might say "segmentation fault" or "access violation". I'm closing this as invalid. Please post to the learn group in the forum if you have questions about this. http://forum.dlang.org/group/learn -- | ||||
April 23, 2017 [Issue 17343] class.init.<symbol> does not working | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=17343 --- Comment #2 from Andrey <andrey@kabylin.ru> --- ok got it. -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply