Permalink
Browse files

In ilasm/tests:

2005-12-14  Ankit Jain  <jankit@novell.com>

	* dotted-names.il: Add test for class with no explicit namespace.

In ilasm/codegen:
2005-12-14  Ankit Jain  <jankit@novell.com>

	* TypeDef.cs (TypeDef.ctor): name_space can be null.


svn path=/trunk/mcs/; revision=54348
  • Loading branch information...
radical committed Dec 14, 2005
1 parent ec6a49b commit 112c3953abc5b9b3fead7c033a5ff65d977c1275
Showing with 34 additions and 11 deletions.
  1. +4 −0 mcs/ilasm/codegen/ChangeLog
  2. +12 −8 mcs/ilasm/codegen/TypeDef.cs
  3. +4 −0 mcs/ilasm/tests/ChangeLog
  4. +14 −3 mcs/ilasm/tests/dotted-names.il
@@ -1,3 +1,7 @@
+2005-12-14 Ankit Jain <jankit@novell.com>
+
+ * TypeDef.cs (TypeDef.ctor): name_space can be null.
+
2005-12-13 Ankit Jain <jankit@novell.com>
* TypeDef.cs (TypeDef.ctor): Ensure that 'name' contains only the last part
@@ -72,14 +72,18 @@ protected class GenericInfo {
is_value_class = false;
is_enum_class = false;
- int lastdot = name.LastIndexOf ('.');
- if (lastdot >= 0) {
- this.name_space = name_space + "." + name.Substring (0, lastdot);
- this.name = name.Substring (lastdot + 1);
- } else {
- this.name_space = name_space;
- this.name = name;
- }
+
+ int lastdot = name.LastIndexOf ('.');
+ if (lastdot >= 0) {
+ if (name_space == null || name_space == "")
+ this.name_space = name.Substring (0, lastdot);
+ else
+ this.name_space = name_space + "." + name.Substring (0, lastdot);
+ this.name = name.Substring (lastdot + 1);
+ } else {
+ this.name_space = name_space;
+ this.name = name;
+ }
}
public string Name {
@@ -1,3 +1,7 @@
+2005-12-14 Ankit Jain <jankit@novell.com>
+
+ * dotted-names.il: Add test for class with no explicit namespace.
+
2005-12-13 Ankit Jain <jankit@novell.com>
* dotted-names.il: New. Test for dotted names in namespace, class.
@@ -1,9 +1,14 @@
//Tests dotted names (namespace, class names)
//It should emit namespace = A.B.C and type name = D
+//For E.F, namespace = E, name = F
-//.assembly extern mscorlib
-//{
-//}
+.assembly extern mscorlib
+{
+}
+
+.assembly Output
+{
+}
.module Output
@@ -15,3 +20,9 @@
}
}
+
+.class public auto autochar sealed beforefieldinit E.F
+ extends [mscorlib]System.Object
+{
+}
+

0 comments on commit 112c395

Please sign in to comment.