uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

E202 Trait not defined

Umple semantic error resulting from a trait not being defined

In Umple, when traits are used inside of classes or traits they have to be defined. The Umple compiler does not allow the use of traits that are not defined in the system.

Example

//In  this example, trait "T" uses trait "T1" which is not available. 
interface I{
	//elements
}

class A {
	isA I;
	isA T; 
}

trait T{
  isA T1;
}

      

Load the above code into UmpleOnline

 

Another Example

//In  this example, the error has been resolved just by defining trait T1. 
interface I{
	//elements
}

class A {
	isA I;
	isA T; 
}

trait T{
  isA T1;
}

trait T1{
	//elements
}

      

Load the above code into UmpleOnline