我想要像这样初始化一个数组 -
Const MyArray : Array[0..0] Of TGUID = (IInterface);
但是它会导致 -
[DCC Error] Test.pas(10): E2010 Incompatible types: 'TGUID' and 'string'
为了看看会发生什么,我尝试了这个 -
Const MyArray : Array[0..0] Of String = (IInterface);
这将导致以下结果!
[DCC Error] Test.pas(10): E2010 Incompatible types: 'string' and 'TGUID'
多么奇怪!明明IInterface只可能是其中之一,但它似乎执意转化为错误的类型。