Browse Source

codecgen: use fully qualified type name for representing types in generated code.

Fixes #70
Update #73
Ugorji Nwoke 10 years ago
parent
commit
5473e56220
1 changed files with 2 additions and 2 deletions
  1. 2 2
      codec/gen.go

+ 2 - 2
codec/gen.go

@@ -1393,7 +1393,7 @@ func genTypeName(t reflect.Type, tRef reflect.Type) (n string) {
 		t = t.Elem()
 	}
 	if tn := t.Name(); tn != "" {
-		return ptrPfx + tn
+		return ptrPfx + genTypeNamePrimitiveKind(t, tRef)
 	}
 	switch t.Kind() {
 	case reflect.Map:
@@ -1420,7 +1420,7 @@ func genMethodNameT(t reflect.Type, tRef reflect.Type) (n string) {
 		t = t.Elem()
 	}
 	if tn := t.Name(); tn != "" {
-		return ptrPfx + tn
+		return ptrPfx + genTypeNamePrimitiveKind(t, tRef)
 	}
 	switch t.Kind() {
 	case reflect.Map: