mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 14:59:32 +02:00
* correctly raise exception
git-svn-id: trunk@36979 -
This commit is contained in:
parent
de469955b3
commit
3cb8cb293d
@ -832,7 +832,7 @@ end;
|
||||
function TValue.AsInterface: IInterface;
|
||||
begin
|
||||
if Kind <> tkInterface then
|
||||
EInvalidCast.Create(SErrInvalidTypecast);
|
||||
raise EInvalidCast.Create(SErrInvalidTypecast);
|
||||
Result := PInterface(FData.FValueData.GetReferenceToRawData)^;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user