#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
op_sys: | Windows 2000 → All |
---|---|
Priority: | highest → lowest |
Severity: | blocker → minor |
Status: | new → assigned |
comment:2 Changed 18 years ago by
Owner: | changed from danirus to Víctor de Buen Remiro |
---|---|
Status: | assigned → new |
comment:3 Changed 18 years ago by
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
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 Changed 18 years ago by
bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000419 |
---|
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