waoywssy / linfu

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

Preconditions checked twice on DesignByContract2. #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile the DbC Sample
2. Run it
3. The error message "Only persons over the age of 18 can withdraw money 
from their accounts!" is displayed twice.

What is the expected output? What do you see instead?
The message to be displayed once.

What version of the product are you using? On what operating system?
TRUNK

Please provide any additional information below.

I've traced the problem to the AddInterface method of the 
AttributeContractProvider class, and fixed it with the following 
modification:

-132 : if (!interfaceList.Contains(type))
+132 : if (!interfaceList.Contains(type) && type.IsInterface)

Original issue reported on code.google.com by pjondeve...@gmail.com on 19 Oct 2008 at 8:01

GoogleCodeExporter commented 9 years ago
Fixed in rev 306.

Original comment by Philip.L...@gmail.com on 24 Oct 2008 at 3:08