[m-rev.] diff: fix string_builder_test in erlang

Peter Wang novalazy at gmail.com
Tue Sep 18 17:22:04 AEST 2007


Estimated hours taken: 0.5
Branches: main

library/erlang_rtti_implementation.m:
	Don't return empty strings as the argument names of the functor [|].
	Just return the empty list to be consistent with the C backends.

	Similarly for tuples.

Index: library/erlang_rtti_implementation.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/erlang_rtti_implementation.m,v
retrieving revision 1.22
diff -u -p -r1.22 erlang_rtti_implementation.m
--- library/erlang_rtti_implementation.m	18 Sep 2007 06:44:32 -0000	1.22
+++ library/erlang_rtti_implementation.m	18 Sep 2007 07:16:35 -0000
@@ -1259,7 +1259,7 @@ get_functor_with_names(TypeInfo, NumFunc
         type_ctor_info_and_args(TypeInfo, _TypeCtorInfo, ArgTypes),
         Name = "{}",
         Arity = list.length(ArgTypes),
-        ArgNames = list.duplicate(Arity, ""),
+        ArgNames = [],
         Result = yes({Name, Arity, ArgTypes, ArgNames})
     ;
         TypeCtorRep = etcr_list,
@@ -1276,7 +1276,7 @@ get_functor_with_names(TypeInfo, NumFunc
             Name = "[|]",
             Arity = 2,
             ArgTypes = [ArgTypeInfo, TypeInfo],
-            ArgNames = ["", ""],
+            ArgNames = [],
             Result = yes({Name, Arity, ArgTypes, ArgNames})
         ;
             Result = no

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list