Label: ♦english ♦bug report

[252] Fresh bugs

Comment
    Here are recent bugs I've encountered:
    1) Using return or yield from within loops or functional methods in a routine always results in inconsistent typing error;
    2) Declaring variables or constants inside an interface causes DVM crash;
    3) Opetator ** doesn't work with long type.
    Also, there is one thing which arguably would be better to change. When an exception is raised from within some macro's code, DVM points out corresponding line from macro's definition. But instead it should point out the actual line where an exception was raised! Otherwise it may be pretty complicated to debug a code with lots of macros.

Comments
The second and third bug are now fixed and updated to the source repository.

Regarding the first one, if you return or yield something in the middle of a routine, which has no return statement in its end, a inconsistent typing error will be raised:
routine  test()
{
    while(1)return1;
}
In the end of test() , it returns nothing, but in the loop, an integer is returned. So there is a inconsistent typing in such case. If what you encountered is not like this, please demonstrate it in an example.

Regarding line location reported by an exception, I think the locations of both the actual line raising the exception and the corresponding line in the macro should be reported. I will handle this when I make improvements to enhance DVM's error diagnostics capabilities as you suggested previously.
    You are right regarding return and yield ; I just didn't expect such level of 'insight' from Dao. Yet, I want to mention another thing I've just faced with. Dao seems to be ignoring multiple routine declaration with the same prototype -- simply the first one defined is used. Shouldn't there be at least some warning for such things?
    The same concerns routines with template-like arguments (@T, map<@T, ?> etc). According to C++ logic, explicitly typed functions should be checked before generalized ones while choosing appropriate function for executing. Dao just ignores all but the first one.

that behavior of choosing an overloaded routine with more generic types over one with more precise types is unreasonable, it need to be fixed. Handling generic types for function/method calls is a bit complicated, there might be some other problems too, some improvements need to be done in the relevant parts.

(Warnings will be raised for duplicated routines with the same prototype.)

Change picture:

Choose file:

123 4
56 78910 11
121314151617 18
192021222324 25
26272829

fu: ... I forgot to say something about the plan for the whole new year in my previous reply. Well, besides w ... (Jan.19,01:40)

fu: ... Happy new dragon year (which will start from this sunday)! Actually, it was a busy month (I wish th ... (Jan.18,22:46)

ybabel: What's the plan for the new year ? Hello 'vry budy :- ) happy new year (when is the new year for you Fu ?) I saw you come back and comm ... (Jan.18,18:59)

This site is powered by Dao
Copyright (C) 2009,2010, daovm.net.
Webmaster: admin@daovm.net