close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#570 closed defect (fixed)

Function If cause mistaken funciton selection in ambiguous ambient

Reported by: Víctor de Buen Remiro Owned by: Víctor de Buen Remiro
Priority: highest Milestone:
Component: Kernel Version: head
Severity: blocker Keywords:
Cc:

Description

This line

Matrix { L = Rand(10,10,-1,1); If(1==0,L,L*Tra(L)) };

Causes these warning and error messages

Warning: [10] El símbolo de función Tra es ambiguo.
VMatrix Tra(VMatrix mat)
; ha sido elegido pero había estas otras 1 opciones:

Matrix Tra(Matrix mat);

ERROR: [34] L no es un objeto valido para el tipo VMatrix.

ERROR: [35] Argumentos erróneos para VMatrix Tra (VMatrix mat)

ERROR: [36] Argumentos erróneos para Matrix * mat1 * mat2 {Matrix mat1, Anything mat2}

Change History (2)

comment:1 Changed 17 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: newclosed

Some special functions as

If, Case, Field (->), Element ([]), PutName, PutDescription, While, ...

call to internal function EvaluateTree that changes the BGrammar::last_ that specifies the default type to be used in ambiguous ambient. Solution is so simple as call to BGrammar::PutLast with the old known type.

comment:2 Changed 17 years ago by Víctor de Buen Remiro

bug_file_loc: http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000570
Note: See TracTickets for help on using tickets.