Feature #22

New keyword: moved_to

Added by Anonymous over 17 years ago. Updated over 17 years ago.

Status:AssignedStart date:
Priority:LowDue date:
Assignee:Alain Prouté% Done:

0%

Category:Compiler
Target version:-
Platform: Triage Stage:
Resolution:

Description

I don't know if it is easy to do, but the goal of this keyword is to generate a message if a function definition has moved from one file to another, and the new definition has not be found by the compiler.

Thus the message will clearly tell to the user that to use the function, he has to read this new file.

Of course, the error message is displayed only if the function is used and the new definition isn't found.

On the old location, the definition has been removed. Only the declaration can be found (parameters and return type), associated with this keyword.

And we can do the same thing with types.

History

#1 Updated by Alain Prouté over 17 years ago

  • Status changed from New to Assigned

There is already something like that. The key locution replaced by may be used instead of read. If we include (using a read) a file which has been displaced, a warning is generated.

I think, the solution may be to generalize this concept for file which are not moved but dispatched into several new files. The original file will contain several lines replaced by ....

#2 Updated by Alain Prouté over 17 years ago

It may be the case that it works already (I mean putting several replaced by in an old file). To be tested.

#3 Updated by Anonymous over 17 years ago

The idea is that the generated error display precise information about which function has moved, so the keyword need to by associated to it.

And I don't think the compiler have to follow the link and read the new file. This is a good think (with a Warning of course) when a entire file has moved (so the 'replaced by' is very usable for this), but for only one or several functions, it's better to force the developer to updates its includes.

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux