Subject: fixbug
By: MND
Fixed: bug1265.as
--* From mnd@dcs.st-and.ac.uk  Tue Oct 17 01:21:23 2000
--* Received: from server-6.tower-4.starlabs.net (mail.london-1.starlabs.net [212.125.75.12])
--* 	by nagmx1.nag.co.uk (8.9.3/8.9.3) with SMTP id BAA09103
--* 	for <ax-bugs@nag.co.uk>; Tue, 17 Oct 2000 01:21:22 +0100 (BST)
--* X-VirusChecked: Checked
--* Received: (qmail 22370 invoked from network); 17 Oct 2000 00:20:49 -0000
--* Received: from pittyvaich.dcs.st-and.ac.uk (138.251.206.55)
--*   by server-6.tower-4.starlabs.net with SMTP; 17 Oct 2000 00:20:49 -0000
--* Received: from dcs.st-and.ac.uk (ara3234-ppp [138.251.206.28])
--* 	by pittyvaich.dcs.st-and.ac.uk (8.9.1b+Sun/8.9.1) with ESMTP id NAA23598
--* 	for <ax-bugs@nag.co.uk>; Mon, 16 Oct 2000 13:35:16 +0100 (BST)
--* Received: (from mnd@localhost)
--* 	by dcs.st-and.ac.uk (8.8.7/8.8.7) id NAA26107
--* 	for ax-bugs@nag.co.uk; Mon, 16 Oct 2000 13:27:21 +0100
--* Date: Mon, 16 Oct 2000 13:27:21 +0100
--* From: mnd <mnd@dcs.st-and.ac.uk>
--* Message-Id: <200010161227.NAA26107@dcs.st-and.ac.uk>
--* To: ax-bugs@nag.co.uk
--* Subject: [8][abnorm] missing semicolon needs suspicious juxtaposition warning

--@ Bug Number:  bug1265.as 
--@ Fixed  by:  MND   
--@ Tested by:  bug1265.as 
--@ Summary:    The result of recent changes to the compiler 

-- Command line: axiomxl -ginterp macexbug.as
-- Version: 1.1.13(0)
-- Original bug file name: macexbug.as


#include "axllib"

AnError:RuntimeException with == add
{
   name():String == "An error has occurred";

   printError(t:TextWriter):() ==
      t << name() << newline;
}


-- Missing ; means that we really ought to have a suspicious juxtaposition
-- warning. As it stands the Execute macro extends to the ; before the final
-- print statement. After macro expansion we find no application of Execute
-- so we discard it leaving just the print statement.
--
-- Alternatively we ought to examine ALL macro definitions for bad recursion.
Execute(BLOCK) ==> BLOCK


Execute(
   try { throw AnError } catch E in
   {
      E has RuntimeException => printError(print)$E;
      true => throw E;
      never;
   }
);


print << "Successful termination." << newline;


_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

