Constrains in extended class

In reply to jjose:

Hello jjose,

As Dave said, there will not be any functional difference between constraints defined inside or outside the class definition.

When you are randomizing an object of class B, class A’s constraint will not be considered because of the same constraint identifier name (c_num1) in class A & B in your example.

You can make all the constraints to be considered by specifying different constraint names in the extended classes.