basmith / stab-language

Automatically exported from code.google.com/p/stab-language
Apache License 2.0
0 stars 0 forks source link

better handling of error #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The following code:

    [StaticClass]
    public class Main {

        public static void main( String[] args){

            Foo<Integer> f = new Bar<Integer>();
            f.Hello<Integer, Integer>(4, 4);
        }
    }

    public class Foo<S> {

        public static int Hello<T,U> (T t, U u){
           return t - u;
        }
    }

generates the error:

C:\Workspace\Eclipse\stab-language\samples\daleks\sources\Daleks.stab (62, 19) 
error 175: Operator '-' cannot applied to
 operand of type 'T' and 'U'
C:\Workspace\Eclipse\stab-language\samples\daleks\sources\Daleks.stab (62, 19) 
error 234: Cannot implicitly convert type
 '<null>' to 'int'

The last error prints "<null>" in the message.

Original issue reported on code.google.com by ice.ta...@gmail.com on 9 Jul 2010 at 11:36

GoogleCodeExporter commented 8 years ago
I just committed a fix.

Original comment by stab.hac...@gmail.com on 27 Oct 2010 at 12:33