This worked in svn r584 (add -m32 switch): --- void g(void delegate(void*, void*) d); struct X { void f(void*, void*) {} void n() { g(&f); // line 8 } } --- But it breaks on posterior revisions. Well, r585 to r587 don't compile/link (I mean the compiler, not the test program); r588 and r589 compiles (the compiler), but the test doesn't compile anymore, with this error: t.d(8): Error: cannot cast from X* to X Maybe some bits of D2 (struct this being a reference?) has been accidentally "ported" to D1. I didn't tested with D2, though.
Since "this" doesn't appear in the code, I'd doubt that that's the cause.
Compiles fine with r589 D2.
(In reply to comment #1) > Since "this" doesn't appear in the code, I'd doubt that that's the cause. I don't know how the compiler internals deals with this, but the error appears in a method, taking the address/delegate of other method, so "this" exists, even if implicit. And D2 works, which is consisten with this theory. But again, I'm just talking out of ignorance because I don't know the compiler internals, it was just a hint.
I was going on the assumption that the _internal concept_ of "this" is the same in D1 and D2, and the difference is merely what the _keyword_ "this" means between the two versions. But you could well ask what obscure thought process the compiler is going through....
The fix for 3706 caused this regression.
http://www.dsource.org/projects/dmd/changeset/590
(In reply to comment #6) > http://www.dsource.org/projects/dmd/changeset/590 Thanks, r590 works fine for me.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル