google-code-export / umple

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

Umple doesn't detect invalid initializer constant strings or in constraints #375

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

class X {
  a = 2;
}

Is an example of code that is accepted even though a string is required. 
Uncompilable code is required.

The parser needs enhancing to detect strings, integers, other numbers, boolean 
constants, dates and times, and then check when these are being assigned in 
initializers. The same code would be used when a comparison is being done in a 
constraint.

Original issue reported on code.google.com by TimothyCLethbridge on 7 Feb 2013 at 1:03

GoogleCodeExporter commented 9 years ago
Following the attached patch which was committed as revision 2935, code such as 
a = 2 will now result in attribute a being interpreted as an integer. The issue 
of conflicts between Umple types and initializers still needs resolving.

Original comment by TimothyCLethbridge on 3 Sep 2013 at 1:15

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by TimothyCLethbridge on 12 Sep 2013 at 2:51

GoogleCodeExporter commented 9 years ago
Fixe as of r2957. Note that "hh:mm:ss" now works to initialize times by default 
(and sets the type as time) as is the case for other initializers.

Original comment by TimothyCLethbridge on 17 Sep 2013 at 1:46