cast question

2012-10-31 Thread Dan
Why do the commented out calls to goo fail? Thanks Dan - import std.stdio; struct S { } void goo(const ref S s) { writeln(s); } struct T { S s; void foo(const ref T other) const { goo(s); // Error: function fdsaf.goo (ref const(S) s) is //

Re: cast question

2012-10-31 Thread Tobias Pankrath
On Wednesday, 31 October 2012 at 16:59:14 UTC, Dan wrote: Why do the commented out calls to goo fail? Thanks Dan Compiles fine with git-head.

Re: cast question

2012-10-31 Thread Dan
On Wednesday, 31 October 2012 at 17:11:47 UTC, Tobias Pankrath wrote: On Wednesday, 31 October 2012 at 16:59:14 UTC, Dan wrote: Why do the commented out calls to goo fail? Thanks Dan Compiles fine with git-head. I did git clone: git clone https://github.com/D-Programming-Language/dmd.git

Re: cast question

2012-10-31 Thread Tobias Pankrath
Ah, okay. I just dumped it into a file and ran dmd before leaving the office. This looks like a compiler bug to me. The struct should be implicitly convertable to const(S)