google-code-export / umple

Automatically exported from code.google.com/p/umple
1 stars 0 forks source link

function of an attribute in a guard incorrectly complains about the attribute not being the right type #496

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Enter the following

class X {
   Integer s;

   D d=new D();
   sm {
     s1{
       e1 [d.getY() ==0] -> s1;
     }
   }
}

class D{
   lazy Integer y;
}

The message Error on line 7 : Attribute 'd' in constraint must be of type 
'integer,float,double,'. More information (29)

is returned inappropriately. It is not d that is being compared to zero, it is 
a function computed from d.
Ironically if you comment out d, there is no warning at all (which is sort-of 
as expected)

Original issue reported on code.google.com by TimothyCLethbridge on 4 Feb 2014 at 12:47

GoogleCodeExporter commented 9 years ago

Original comment by TimothyCLethbridge on 1 May 2014 at 2:02