Ticket #146 (closed defect: fixed)
Report error on instance redefinition
|Reported by:||erikd||Owned by:||erikd|
data Whatever = A Int | B String instance Show Whatever where show (A _) = "integer" show (B _) = "string" instance Show Whatever where show (A x) = show x show (B x) = show x
fails at the C compile stage with:
./Test.ddc.c:96: error: redefinition of 'Test_instance_Show_Whatever_show' ./Test.ddc.c:46: note: previous definition of 'Test_instance_Show_Whatever_show' was here
Instead, it should result in a compiler error because the instance is being redefined.
This is related to bug #33 (Check for conflicting projection functions).