overload bug (or limitation)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

overload bug (or limitation)

sledorze
given this file:

typedef Doc = Dynamic;

extern
class Other {

  @:overload(function(doc : Doc) : Void {})
  public function insert(x : Int) : Void;

}

this usage:

class Main {
       
        static function main() {
    var x : Other = null;
    x.insert({});
        }
       
}

results in this compiler error:

"Class not found: Doc", refering to the overload definition.
Reply | Threaded
Open this post in threaded view
|

Re: overload bug (or limitation)

sledorze
FORGET IT!
BAD CASE SHRINK ... I'LL REPOST IF NEEDED.
Reply | Threaded
Open this post in threaded view
|

Re: overload bug (or limitation)

sledorze
Ok, there's no problem BUT; if you forgot to include a file; the compiler will complain about an unknown class in the file you forgot to include (not into the file where the import is missing).
I think that the fallback to resolve overloads function knows about some files you did not include but can't type them (even if they are providing the definition on which they fail to type).
I hope I'm not too unclear.
The only remaining problem is that you can't know in which file you forgot to do the include.

Stéphane

On Wed, Oct 19, 2011 at 2:32 PM, sledorze [via Haxe] <[hidden email]> wrote:
FORGET IT!
BAD CASE SHRINK ... I'LL REPOST IF NEEDED.


If you reply to this email, your message will be added to the discussion below:
http://haxe.1354130.n2.nabble.com/overload-bug-or-limitation-tp6908441p6908458.html
To unsubscribe from overload bug (or limitation), click here.



--
Stéphane Le Dorze