bug-sather
[Top][All Lists]
Advanced

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

Bug with Sather 1.2.3


From: Samuel A. Falvo II
Subject: Bug with Sather 1.2.3
Date: Wed, 23 Jul 2008 11:26:07 -0700

I tried reproducing the program texts from this webpage:
http://www.gnu.org/software/sather/docs-1.2/tutorial/overloading.html

Here, I edited a file called "t.sa", as follows:

-- begin t.sa
abstract class $ANIMAL is
end;

abstract class $COW < $ANIMAL is
end;

abstract class $PIG < $ANIMAL is
end;

abstract class $COW_FARM is
    has(a:$COW): BOOL;
end;

abstract class $PIG_FARM is
    has(a:$PIG): BOOL;
end;

abstract class $FARM < $COW_FARM, $PIG_FARM is
    has(an:$ANIMAL): BOOL;  --  Compiler error!
end;

class MAIN is
    main is
        #OUT+"Boo.\n";
    end;
end;
-- end t.sa

I attempt to compile the program as follows:

$ sacomp -main MAIN -o t t.sa

I receive the following diagnostic:

t.sa:20:8: The signatures $PIG_FARM::has($PIG):BOOL and
$COW_FARM::has($COW):BOOL must be disambiguated by an explicit sig.

This stands in direct opposition to what the documentation says should
be permissible.

Hope this report is useful!  I'm not sure where to look to fix the bug
locally here, unfortunately.

-- 
Samuel A. Falvo II




reply via email to

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