在Unit1中Class1的Interface中引用了Unit2中的Class2
在Unit2中Class2的Interface中引用了Unit1中的Class1
就是循环引用
如果都在Uses中引用对方肯定会产生循环引用而通不过
于是就在Unit1中Class1的定义前加上了type Class2=class(TObject);
这样Unit1在implementation部分uses Unit2
而Unit2在interface中uses Unit1循环引用是不会有了,但却提示我Unit1定义的Class2与Unit2中的Class2为不协调的类型,如何解决