- edited description
Forward declaration, partial and inheritance
Issue #88
resolved
At commit 8089060 the following script compiles:
unit test;
interface
type
JClassOne = partial class external 'ClassOne';
JClassTwo = partial class external 'ClassTwo' (JClassOne)
public
end;
JClassOne = class external 'ClassOne'
public
end;
After commit 03b7919 or newer the script gives errors:
Syntax Error: Class "JClassOne" isn't defined completely [line: 8, column: 50]
Syntax Error: External classes must inherit from an external class or Object [line: 8, column: 59]
Comments (5)
-
reporter -
reporter - edited description
-
reporter - edited description
-
I found the same issue. However, in my case I was able to find solutions which were better in terms clearness.
In your case I would bet that adding an additional 'partial' modifier to the second class declaration might solve it.
Or additionally if you add an 'end;' after the first declaration might solve the issue.
As of now the first partial declaration is just some sort of forward, which doesn't find an equivalent. Adding the additional 'end;' will convert it right at the beginning to a partial class (and not a forward).
-
reporter - changed status to resolved
Christian, you are of course correct. Your "workaround" is perfect. Thanks!
- Log in to comment