B
Ben Voigt
Getting a C1001 internal error off the following code:
I've found an alternate means of making the Node property accessible in the
parent class only using a public interface, private implementation class,
and static_cast to downcast, but now I'm stuck wondering how to prevent any
other class from being derived from that interface!
Still thought I'd post this ICE to see if anyone else can validate it.
ref class PrioritizedWorkScheduler
{
public:
ref class ScheduledTask;
private:
interface class ITask
{
property System::Collections::Generic::LinkedListNode<ScheduledTask^>^
Node
{
System::Collections::Generic::LinkedListNode<ScheduledTask^>^ get();
}
};
public:
ref class ScheduledTask sealed : ITask
{
initonly System::Collections::Generic::LinkedListNode<ScheduledTask^>^
me;
property System::Collections::Generic::LinkedListNode<ScheduledTask^>^
Node
{
virtual System::Collections::Generic::LinkedListNode<ScheduledTask^>^
get() sealed = ITask::Node::get
{
return me;
}
}
public:
ScheduledTask()
{
me = gcnew
System::Collections::Generic::LinkedListNode<ScheduledTask^>(this);
}
};
};
I've found an alternate means of making the Node property accessible in the
parent class only using a public interface, private implementation class,
and static_cast to downcast, but now I'm stuck wondering how to prevent any
other class from being derived from that interface!
Still thought I'd post this ICE to see if anyone else can validate it.
ref class PrioritizedWorkScheduler
{
public:
ref class ScheduledTask;
private:
interface class ITask
{
property System::Collections::Generic::LinkedListNode<ScheduledTask^>^
Node
{
System::Collections::Generic::LinkedListNode<ScheduledTask^>^ get();
}
};
public:
ref class ScheduledTask sealed : ITask
{
initonly System::Collections::Generic::LinkedListNode<ScheduledTask^>^
me;
property System::Collections::Generic::LinkedListNode<ScheduledTask^>^
Node
{
virtual System::Collections::Generic::LinkedListNode<ScheduledTask^>^
get() sealed = ITask::Node::get
{
return me;
}
}
public:
ScheduledTask()
{
me = gcnew
System::Collections::Generic::LinkedListNode<ScheduledTask^>(this);
}
};
};