Compiler bug with __event and derivation

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 ?
 
E

Edward Diener

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top