www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Workarounds for forward reference bugs

reply "simendsjo" <simendsjo gmail.com> writes:
Are there any known workarounds for forward reference bugs?
I see 80 bugs is filed, but I don't want to read all of them to 
find any workarounds. I cannot find anything on the wiki 
regarding this.

So.. Any good ideas how to get around this?
Oct 05 2012
next sibling parent Don Clugston <dac nospam.com> writes:
On 05/10/12 16:33, simendsjo wrote:
 Are there any known workarounds for forward reference bugs?
 I see 80 bugs is filed, but I don't want to read all of them to find any
 workarounds. I cannot find anything on the wiki regarding this.

 So.. Any good ideas how to get around this?

Those "forward reference" bugs have very little in common with one another, other than the name. It's like "regressions". You'll need to be a little more specific.
Oct 05 2012
prev sibling next sibling parent "simendsjo" <simendsjo gmail.com> writes:
On Friday, 5 October 2012 at 15:16:10 UTC, Don Clugston wrote:
 On 05/10/12 16:33, simendsjo wrote:
 Are there any known workarounds for forward reference bugs?
 I see 80 bugs is filed, but I don't want to read all of them 
 to find any
 workarounds. I cannot find anything on the wiki regarding this.

 So.. Any good ideas how to get around this?

Those "forward reference" bugs have very little in common with one another, other than the name. It's like "regressions". You'll need to be a little more specific.

import derelict.sfml2.graphics; void main() { auto font = sfFont_createFromFile(""); auto size = font.size; // Error: struct sfFont is forward referenced } $ rdmd -I\code\Derelict3\import forward_reference_bug forward_reference_bug.d(5): Error: struct sfFont is forward referenced Failed: "dmd" "-I\code\Derelict3\import" "-v" "-o-" "forward_reference_bug.d" "-I."
Oct 06 2012
prev sibling parent "simendsjo" <simendsjo gmail.com> writes:
On Saturday, 6 October 2012 at 10:17:34 UTC, simendsjo wrote:
 On Friday, 5 October 2012 at 15:16:10 UTC, Don Clugston wrote:
 On 05/10/12 16:33, simendsjo wrote:
 Are there any known workarounds for forward reference bugs?
 I see 80 bugs is filed, but I don't want to read all of them 
 to find any
 workarounds. I cannot find anything on the wiki regarding 
 this.

 So.. Any good ideas how to get around this?

Those "forward reference" bugs have very little in common with one another, other than the name. It's like "regressions". You'll need to be a little more specific.

import derelict.sfml2.graphics; void main() { auto font = sfFont_createFromFile(""); auto size = font.size; // Error: struct sfFont is forward referenced } $ rdmd -I\code\Derelict3\import forward_reference_bug forward_reference_bug.d(5): Error: struct sfFont is forward referenced Failed: "dmd" "-I\code\Derelict3\import" "-v" "-o-" "forward_reference_bug.d" "-I."

On second thought.. I don't think this is a bug and rather my fault. sfFont is just defined as "struct sfFont;", so there are no fields. Everything is accessed through functions. My bad :/
Oct 06 2012