|
From: Eric L. <ey...@us...> - 2014-07-15 18:55:06
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The Panini language compiler".
The branch, master has been updated
Summary of changes:
src/share/classes/org/paninij/comp/Lower.java | 6 ++++--
.../panc-internals/TMainCapsuleNameMismatch.java | 2 +-
.../panc-internals/TMainCapsuleNameMismatch.out | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
via a4fa67ff3f0f27cf692a06103c5eb6980c9d38c3 (commit)
via 69558bb0f5f5c297a99dd7ac56d3c15d6600dc59 (commit)
from 48c2024467e7cfa771f79e51cb356b39fc451cbc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a4fa67ff3f0f27cf692a06103c5eb6980c9d38c3
Merge: 69558bb 48c2024
Author: eyhlin <ey...@ia...>
Date: Tue Jul 15 13:54:55 2014 -0500
Merge branch 'master' of ssh://git.code.sf.net/p/paninij/panc
commit 69558bb0f5f5c297a99dd7ac56d3c15d6600dc59
Author: eyhlin <ey...@ia...>
Date: Tue Jul 15 13:54:37 2014 -0500
Fixed error message of mismatch capsule names and test case of it
diff --git a/src/share/classes/org/paninij/comp/Lower.java b/src/share/classes/org/paninij/comp/Lower.java
index e74cfb5..7a05f93 100644
--- a/src/share/classes/org/paninij/comp/Lower.java
+++ b/src/share/classes/org/paninij/comp/Lower.java
@@ -22,6 +22,8 @@ import static com.sun.tools.javac.code.Flags.PUBLIC;
import static com.sun.tools.javac.code.Flags.STATIC;
import static com.sun.tools.javac.code.Flags.SYNTHETIC;
+import java.io.File;
+
import javax.tools.JavaFileObject;
import sun.util.logging.resources.logging;
@@ -157,9 +159,9 @@ public class Lower {
JavaFileObject.Kind.SOURCE))
pAttr.log.error("active.capsule.filename.mismatch",
tree.parentCapsule.name,
- env.toplevel.sourcefile.getName());
+ new File(env.toplevel.sourcefile.getName()).getName());
createMainRunCapsule(tree, sysArgs, mainStmts);
- }
+ }
}
/**
diff --git a/test/tools/panc/panc-internals/TMainCapsuleNameMismatch.java b/test/tools/panc/panc-internals/TMainCapsuleNameMismatch.java
index 7f6b839..571f424 100644
--- a/test/tools/panc/panc-internals/TMainCapsuleNameMismatch.java
+++ b/test/tools/panc/panc-internals/TMainCapsuleNameMismatch.java
@@ -19,7 +19,7 @@
/* @test
* @summary Make sure naming of main capsule is the same as the containing filename
- * @compile/fail/ref=TMainCapsuleNameMismatch.out TMainCapsuleNameMismatch.java
+ * @compile/fail/ref=TMainCapsuleNameMismatch.out -XDrawDiagnostics TMainCapsuleNameMismatch.java
*/
capsule TMainCapsuleNameMismatch{}
diff --git a/test/tools/panc/panc-internals/TMainCapsuleNameMismatch.out b/test/tools/panc/panc-internals/TMainCapsuleNameMismatch.out
index 7dba5e0..06ddc01 100644
--- a/test/tools/panc/panc-internals/TMainCapsuleNameMismatch.out
+++ b/test/tools/panc/panc-internals/TMainCapsuleNameMismatch.out
@@ -1,2 +1,2 @@
-error: Name of main capsule TMainCapsule should match the containing sourcefile name /Users/eylin/Documents/workspace/panc/test/tools/panc/panc-internals/TMainCapsuleNameMismatch.java
+- compiler.err.active.capsule.filename.mismatch: TMainCapsule, TMainCapsuleNameMismatch.java
1 error
\ No newline at end of file
-----------------------------------------------------------------------
hooks/post-receive
--
The Panini language compiler
|