Opened 23 months ago

Last modified 21 months ago

#498 new defect

invalid comparison of objects

Reported by: vadim.godunko Owned by:
Priority: major Milestone: 19.0
Component: Matreshka - a2js Version:
Keywords: Cc:

Description

Following code raise exception but should not:

with Reals;

procedure Test_1 is
   use type Reals.Geometry_3D.Point_3D;

   A : Reals.Geometry_3D.Point_3D
     := Reals.Geometry_3D.To_Point_3D (0.0, 0.0, 0.0);
   B : Reals.Geometry_3D.Point_3D
     := Reals.Geometry_3D.To_Point_3D (0.0, 0.0, 0.0);

begin
   if A /= B then
      raise Program_Error;
   end if;
end Test_1;

A and B are compared "as objects" instead of "as values".

Attachments (13)

reals.ads (1.6 KB ) - added by vadim.godunko 23 months ago.
generic_algebra_2.adb (2.1 KB ) - added by vadim.godunko 23 months ago.
generic_algebra_2.ads (1.5 KB ) - added by vadim.godunko 23 months ago.
generic_algebra_3.ads (958 bytes ) - added by vadim.godunko 23 months ago.
generic_algebra_4.adb (11.3 KB ) - added by vadim.godunko 23 months ago.
generic_algebra_4.ads (1.5 KB ) - added by vadim.godunko 23 months ago.
generic_fuzzy_compare.adb (1.0 KB ) - added by vadim.godunko 23 months ago.
generic_fuzzy_compare.ads (996 bytes ) - added by vadim.godunko 23 months ago.
generic_geometry_2d.adb (7.4 KB ) - added by vadim.godunko 23 months ago.
generic_geometry_2d.ads (3.9 KB ) - added by vadim.godunko 23 months ago.
generic_geometry_3d.adb (9.9 KB ) - added by vadim.godunko 23 months ago.
generic_geometry_3d.ads (4.5 KB ) - added by vadim.godunko 23 months ago.
test_1.adb (327 bytes ) - added by vadim.godunko 23 months ago.

Download all attachments as: .zip

Change History (17)

by vadim.godunko, 23 months ago

Attachment: reals.ads added

by vadim.godunko, 23 months ago

Attachment: generic_algebra_2.adb added

by vadim.godunko, 23 months ago

Attachment: generic_algebra_2.ads added

by vadim.godunko, 23 months ago

Attachment: generic_algebra_3.ads added

by vadim.godunko, 23 months ago

Attachment: generic_algebra_4.adb added

by vadim.godunko, 23 months ago

Attachment: generic_algebra_4.ads added

by vadim.godunko, 23 months ago

Attachment: generic_fuzzy_compare.adb added

by vadim.godunko, 23 months ago

Attachment: generic_fuzzy_compare.ads added

by vadim.godunko, 23 months ago

Attachment: generic_geometry_2d.adb added

by vadim.godunko, 23 months ago

Attachment: generic_geometry_2d.ads added

by vadim.godunko, 23 months ago

Attachment: generic_geometry_3d.adb added

by vadim.godunko, 23 months ago

Attachment: generic_geometry_3d.ads added

by vadim.godunko, 23 months ago

Attachment: test_1.adb added

comment:1 by Maxim Reznik, 23 months ago

In 5862:

Compare private array using _eq/_ne

Refs #498

comment:2 by Maxim Reznik, 23 months ago

In 5863:

Compare inherited array using _eq/_ne

Refs #498

comment:3 by vadim.godunko, 21 months ago

Milestone: 0.8.018.0

Milestone renamed

comment:4 by vadim.godunko, 21 months ago

Milestone: 18.019.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.