// Two simple value type structures. one embedded in the other.
I've stepped through the debugger and I see the embedded
structure being set to 2, and dog.
import std.stdio;
struct NestedBottom
{
int i;
char[3] fixedArray;
// this(){} no-argument ctor can only be defined by
On Saturday, 22 November 2014 at 20:57:07 UTC, WhatMeWorry wrote:
auto bottom = NestedBottom(2, ['d','o','g']);
That 'auto' is the problem. You want 'this.bottom = ...' instead.
On Sat, 22 Nov 2014 20:57:05 +
WhatMeWorry via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
auto bottom = NestedBottom(2, ['d','o','g']);
ah, that good old thingy! there were some debates about locals that
shadows fields and how that can introduce some hard-to-catch
On Sat, Nov 22, 2014 at 11:54:01PM +0200, ketmar via Digitalmars-d-learn wrote:
On Sat, 22 Nov 2014 20:57:05 +
WhatMeWorry via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
auto bottom = NestedBottom(2, ['d','o','g']);
ah, that good old thingy! there were some