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 19 years ago

Closed 18 years ago

Last modified 18 years ago

#419 closed defect (fixed)

Problem with BinGroup

Reported by: giken019 Owned by: Víctor de Buen Remiro
Priority: lowest Milestone:
Component: Kernel Version: head
Severity: minor Keywords:
Cc:

Description

The following makes Tol crash:

Anything a = 5;
Anything b = 6;
Anything c = 7;
Anything d = 8;
Anything BBB = SetOfAnything(a,b,c,d);
Anything CCC= BinGroup("+",BBB);


If the last line is changed to

Real CCC= BinGroup("+",BBB);

Then it works (however BinGroup is supposed to be of type Anything, so I am not sure how to use it). Hope that information is useful.

Change History (5)

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

op_sys: Windows 2000All
Priority: highestlowest
Severity: blockerminor
Status: newassigned

Really, this is an unusal and not recommended use of TOL. Anything should be used to declare arguments of functions which type is unknown a priori. Anything is not a real Type but a meta-type that includes all types. When a function returns Anything or take an Anything argument it means that you can use it with objects of any type, not that you must use Anything declared objects.

You know a=5 is a Real object and the sume of reals are Real too, so correct declaration is

Real a = 5;
Real b = 6;
Real c = 7;
Real d = 8;
Real BBB = SetOfAnything(a,b,c,d);
Real CCC= BinGroup("+",BBB);

However, TOL should not crash, so bug is accepted with minor severity

Thanks to report it

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

Owner: changed from danirus to Víctor de Buen Remiro
Status: assignednew

comment:3 Changed 18 years ago by Víctor de Buen Remiro

Problem has been fixed in CVS and a test is added to

tol_tests/tol/bugzilla/bug_000419

No object will be created for Anything BinGroup nor Group and an error like this will be displayed:

Cannot eval BinGroup returning an object of type Anything.

Thanks to report it

comment:4 Changed 18 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: newclosed

comment:5 Changed 18 years ago by Víctor de Buen Remiro

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