Compiler bug with __event and derivation

  • Thread starter Thread starter Edward Diener
  • Start date Start date
E

Edward Diener

I have a __gc class, let's call it ClassB, derived from ClassA, which has an
__event, and eventually derived from System::ComponentModel::Component. This
ClassB has no __event. I derived another class from ClassB, let's call it
ClassC, which has an __event. When I try to compile ClassC's source I get:

somepath\ClassC.h(119) : error C3701: 'somePath\ClassB.h': event source has no
events

Line 119 in somepath\ClassC.h is the closing brace of the ClassC definition. I
am specifying no [ event_source(...) ] in any file so I assume this is being
generated internally by the compiler when I specify __event.

Is this a known bug and, if it is, what is the workaround to this bug ?
 
Edward said:
I have a __gc class, let's call it ClassB, derived from ClassA, which
has an __event, and eventually derived from
System::ComponentModel::Component. This ClassB has no __event. I derived
another class from ClassB, let's call it ClassC, which has an __event.
When I try to compile ClassC's source I get:

somepath\ClassC.h(119) : error C3701: 'somePath\ClassB.h': event source
has no events

Line 119 in somepath\ClassC.h is the closing brace of the ClassC
definition. I am specifying no [ event_source(...) ] in any file so I
assume this is being generated internally by the compiler when I specify
__event.

Is this a known bug and, if it is, what is the workaround to this bug ?

The bug manifesats itself as soon as I add a single:

[System::ComponentModel::DescriptionAttribute("Some message")]

to a __property of ClassB.

Without a description attribute for any property of ClassB, the compile works
without error. Not using any attribute for a __property of ClassB is not an
acceptable workaround.
 
Back
Top