gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] another one, with procedure value being returned, present as of 0.


From: Dragiša Durić
Subject: [Gm2] another one, with procedure value being returned, present as of 0.9.8-1.2
Date: Sun, 19 Sep 2010 12:38:18 +0200

% gm2 -fiso -c TestCase15.mod 
TestCase15.mod:13:5: error: attempting to RETURN a value with an incompatible 
type (BOOLEAN) from a function which returns (ErrPROC)

MODULE TestCase15;

TYPE
  ErrPROC = PROCEDURE(): BOOLEAN;
  
PROCEDURE NILErrorProc(): BOOLEAN;
  BEGIN
    RETURN FALSE;
  END NILErrorProc;
  
PROCEDURE GetErrorProc(): ErrPROC;
  BEGIN
    RETURN NILErrorProc;
  END GetErrorProc;
  
BEGIN
END TestCase15.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]