# HG changeset patch # User Michael Van De Vanter # Date 1405459334 25200 # Node ID 247a6c2fc38249fba25bcdb839de65a2f97e37b8 # Parent d86f948268daafde412595ce8f21447949ee9d8a SL: update tests; error locations reported differently with source attribution change. diff -r d86f948268da -r 247a6c2fc382 graal/com.oracle.truffle.sl.test/tests/String.output --- a/graal/com.oracle.truffle.sl.test/tests/String.output Mon Jul 14 17:06:32 2014 -0700 +++ b/graal/com.oracle.truffle.sl.test/tests/String.output Tue Jul 15 14:22:14 2014 -0700 @@ -7,4 +7,4 @@ bars foos 2 < 4: true -Type error at String.sl line 9 col 36: operation "<" not defined for Number 2, String "4" +Type error at String.sl line 9 col 34: operation "<" not defined for Number 2, String "4" diff -r d86f948268da -r 247a6c2fc382 graal/com.oracle.truffle.sl.test/tests/error/TypeError01.output --- a/graal/com.oracle.truffle.sl.test/tests/error/TypeError01.output Mon Jul 14 17:06:32 2014 -0700 +++ b/graal/com.oracle.truffle.sl.test/tests/error/TypeError01.output Tue Jul 15 14:22:14 2014 -0700 @@ -1,1 +1,1 @@ -Type error at TypeError01.sl line 2 col 5: operation "-" not defined for Number 3, String "4" +Type error at TypeError01.sl line 2 col 3: operation "-" not defined for Number 3, String "4" diff -r d86f948268da -r 247a6c2fc382 graal/com.oracle.truffle.sl.test/tests/error/TypeError03.output --- a/graal/com.oracle.truffle.sl.test/tests/error/TypeError03.output Mon Jul 14 17:06:32 2014 -0700 +++ b/graal/com.oracle.truffle.sl.test/tests/error/TypeError03.output Tue Jul 15 14:22:14 2014 -0700 @@ -1,1 +1,1 @@ -Type error at TypeError03.sl line 2 col 7: operation "&&" not defined for String "4", ANY +Type error at TypeError03.sl line 2 col 3: operation "&&" not defined for String "4", ANY diff -r d86f948268da -r 247a6c2fc382 graal/com.oracle.truffle.sl.test/tests/error/TypeError04.output --- a/graal/com.oracle.truffle.sl.test/tests/error/TypeError04.output Mon Jul 14 17:06:32 2014 -0700 +++ b/graal/com.oracle.truffle.sl.test/tests/error/TypeError04.output Tue Jul 15 14:22:14 2014 -0700 @@ -1,1 +1,1 @@ -Type error at TypeError04.sl line 2 col 11: operation "||" not defined for Boolean false, Number 4 +Type error at TypeError04.sl line 2 col 4: operation "||" not defined for Boolean false, Number 4 diff -r d86f948268da -r 247a6c2fc382 graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLMain.java --- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLMain.java Mon Jul 14 17:06:32 2014 -0700 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLMain.java Tue Jul 15 14:22:14 2014 -0700 @@ -245,9 +245,7 @@ result.append("Type error"); if (ex.getNode() != null && ex.getNode().getSourceSection() != null) { SourceSection ss = ex.getNode().getSourceSection(); - if (ss == null || ss instanceof NullSourceSection) { - result.append(" at "); - } else { + if (ss != null && !(ss instanceof NullSourceSection)) { result.append(" at ").append(ss.getSource().getName()).append(" line ").append(ss.getStartLine()).append(" col ").append(ss.getStartColumn()); } }