list of dots Digital Research Alliance of Canada logo  NSERC logo  University of Ottawa logo / UniversitĂ© d'Ottawa

User Manual    [Previous]   [Next]   

E3501 Template Method Cannot Be Main

Umple semantic error raised when a template emit method uses the method name "main"

A template emit method cannot be called "main", as it would cause a conflict with the main method.

Example

//The emit method name
//cannot be main, the error
//is produced
class A {
  template <<!output!>>
  emit main()(template);
}
      

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

//Using another method name
//solves the error
class A {
  template <<!output!>>
  emit method()(template);
}
      

Load the above code into UmpleOnline