Bug #10

Inversion of constructor parameters into error message

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

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Alain Prouté% Done:

0%

Category:Compiler
Target version:1.8
Platform: Triage Stage:
Resolution:fixed

Description

If I compile this code :

type [[BufferedConnection]]:
  buffered_connection(Connection     conn,
                      Var(ByteArray) buffer,
                      Var(Int32)     read_pos).

// then in a function
....
  with connection = buffered_connection(conn, constant_byte_array(0, 0), var(0)),
...

the compiler output an error (this is normal, a var(...) is missing) with this lazy message :

D:/Develop/Anubis/EZMailBox/EZMailBox/calexium_lib/web/CXM_multihost_http_server.anubis (line 2878, column 42) Error E021:    The operation is incompatible with the arguments.
   (It may also happen that the wanted operation has not been defined.)
   Interpretations of operation:

      1.  D:/Develop/Anubis/EZMailBox/EZMailBox/calexium_lib/web/CXM_multihost_http_server.anubis:595: buffered_connection
public define 
  [[BufferedConnection]]
    buffered_connection
      (
        Var(Int32) conn,
        Var(ByteArray) buffer,
        Connection read_pos
      ).

   Interpretations of arguments:
   argument number 1:
      1.  Connection
   argument number 2:
      1.  [[ByteArray]]
   argument number 3:
      1.  Var(Word4)
      2.  Var(Word8)
      3.  Var(Word16)
      4.  Var(Word32)
      5.  Var(Float)
      6.  Var(Nat)
      7.  Var(Int32)

You can notice that the buffered_connection() parameters aren't in the good order, nor with the good type.

This can be very disturbing.

History

#1 Updated by Alain Prouté over 17 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux