[m-rev.] diff: fix tests/invalid/illtyped_compare in grade java
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Feb 20 14:00:05 AEDT 2004
Estimated hours taken: 1
Branches: main
Fix a failure of tests/invalid/illtyped_compare in grade java.
tests/invalid/Mercury.options:
Don't use intermodule optimization for the illtyped_compare
test case (except when creating the .err file). As with many
other tests in this directory, using intermodule optimization for
that test case causes the errors to be diagnosed too early (when
creating the .opt file), resulting in a spurious test failure.
tests/invalid/illtyped_compare.m:
Add a Java foreign_type declaration corresponding to the C and C# ones.
tests/invalid/illtyped_compare.err_exp:
Adjust the line numbers in the error message to reflect the above
change to illtyped_compare.m.
Workspace: /home/jupiter/fjh/ws-jupiter/mercury
Index: tests/invalid/Mercury.options
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/Mercury.options,v
retrieving revision 1.8
diff -u -d -r1.8 Mercury.options
--- tests/invalid/Mercury.options 18 Feb 2004 23:17:59 -0000 1.8
+++ tests/invalid/Mercury.options 20 Feb 2004 02:57:24 -0000
@@ -39,6 +39,8 @@
--no-automatic-intermodule-optimization
MCFLAGS-foreign_type_visibility = --no-intermodule-optimization \
--no-automatic-intermodule-optimization
+MCFLAGS-illtyped_compare = --no-intermodule-optimization \
+ --no-automatic-intermodule-optimization
MCFLAGS-import_in_parent = --no-intermodule-optimization \
--no-automatic-intermodule-optimization
MCFLAGS-import_in_parent.sub = --no-intermodule-optimization \
Index: tests/invalid/illtyped_compare.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/illtyped_compare.err_exp,v
retrieving revision 1.1
diff -u -d -r1.1 illtyped_compare.err_exp
--- tests/invalid/illtyped_compare.err_exp 21 Aug 2003 07:01:18 -0000 1.1
+++ tests/invalid/illtyped_compare.err_exp 20 Feb 2004 02:56:26 -0000
@@ -1,17 +1,17 @@
-illtyped_compare.m:015: In clause for unification predicate for type illtyped_compare.bar_rep:
-illtyped_compare.m:015: in argument 2 of call to predicate `illtyped_compare.compare_bar/3':
-illtyped_compare.m:015: type error: variable `HeadVar__1' has type `(illtyped_compare.bar_rep)',
-illtyped_compare.m:015: expected type was `(illtyped_compare.bar)'.
-illtyped_compare.m:015: In clause for unification predicate for type illtyped_compare.bar_rep:
-illtyped_compare.m:015: in argument 3 of call to predicate `illtyped_compare.compare_bar/3':
-illtyped_compare.m:015: type error: variable `HeadVar__2' has type `(illtyped_compare.bar_rep)',
-illtyped_compare.m:015: expected type was `(illtyped_compare.bar)'.
-illtyped_compare.m:015: In clause for comparison predicate for type illtyped_compare.bar_rep:
-illtyped_compare.m:015: in argument 2 of call to predicate `illtyped_compare.compare_bar/3':
-illtyped_compare.m:015: type error: variable `HeadVar__2' has type `(illtyped_compare.bar_rep)',
-illtyped_compare.m:015: expected type was `(illtyped_compare.bar)'.
-illtyped_compare.m:015: In clause for comparison predicate for type illtyped_compare.bar_rep:
-illtyped_compare.m:015: in argument 3 of call to predicate `illtyped_compare.compare_bar/3':
-illtyped_compare.m:015: type error: variable `HeadVar__3' has type `(illtyped_compare.bar_rep)',
-illtyped_compare.m:015: expected type was `(illtyped_compare.bar)'.
+illtyped_compare.m:017: In clause for unification predicate for type illtyped_compare.bar_rep:
+illtyped_compare.m:017: in argument 2 of call to predicate `illtyped_compare.compare_bar/3':
+illtyped_compare.m:017: type error: variable `HeadVar__1' has type `(illtyped_compare.bar_rep)',
+illtyped_compare.m:017: expected type was `(illtyped_compare.bar)'.
+illtyped_compare.m:017: In clause for unification predicate for type illtyped_compare.bar_rep:
+illtyped_compare.m:017: in argument 3 of call to predicate `illtyped_compare.compare_bar/3':
+illtyped_compare.m:017: type error: variable `HeadVar__2' has type `(illtyped_compare.bar_rep)',
+illtyped_compare.m:017: expected type was `(illtyped_compare.bar)'.
+illtyped_compare.m:017: In clause for comparison predicate for type illtyped_compare.bar_rep:
+illtyped_compare.m:017: in argument 2 of call to predicate `illtyped_compare.compare_bar/3':
+illtyped_compare.m:017: type error: variable `HeadVar__2' has type `(illtyped_compare.bar_rep)',
+illtyped_compare.m:017: expected type was `(illtyped_compare.bar)'.
+illtyped_compare.m:017: In clause for comparison predicate for type illtyped_compare.bar_rep:
+illtyped_compare.m:017: in argument 3 of call to predicate `illtyped_compare.compare_bar/3':
+illtyped_compare.m:017: type error: variable `HeadVar__3' has type `(illtyped_compare.bar_rep)',
+illtyped_compare.m:017: expected type was `(illtyped_compare.bar)'.
For more information, try recompiling with `-E'.
Index: tests/invalid/illtyped_compare.m
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/illtyped_compare.m,v
retrieving revision 1.1
diff -u -d -r1.1 illtyped_compare.m
--- tests/invalid/illtyped_compare.m 21 Aug 2003 07:01:18 -0000 1.1
+++ tests/invalid/illtyped_compare.m 20 Feb 2004 02:08:13 -0000
@@ -14,6 +14,8 @@
where comparison is compare_bar.
:- pragma foreign_type("IL", bar_rep, "valuetype [mscorlib]System.Double")
where comparison is compare_bar.
+:- pragma foreign_type("Java", bar_rep, "long")
+ where comparison is compare_bar.
:- pred compare_bar(comparison_result::uo, bar::in, bar::in) is det.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list