Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/AssemblyGenerator.Attributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static void EncodeLiteral(LiteralEncoder litEnc, CustomAttributeTypedArgument ar
if (arg.Value is Type type)
{
// Type reference
litEnc.Scalar().SystemType(type.FullName);
litEnc.Scalar().SystemType(type.AssemblyQualifiedName);
}
else if (arg.Value is ReadOnlyCollection<CustomAttributeTypedArgument> array)
{
Expand Down Expand Up @@ -162,4 +162,4 @@ static PrimitiveSerializationTypeCode PrimitiveTypeCodeFromSystemTypeCode(Type t
throw new NotImplementedException($"Unsupported primitive type: {type}");
}
}
}
}
4 changes: 2 additions & 2 deletions src/Metadata/AssemblyMetadata.Types.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public bool IsReferencedType(Type type)

// todo, also maybe in Module, ModuleRef, AssemblyRef and TypeRef
// ECMA-335 page 273-274
return type.Assembly != SourceAssembly;
return !SourceAssembly.FullName.Equals(type.Assembly.FullName);
}

private EntityHandle ResolveTypeReference(Type type)
Expand Down Expand Up @@ -141,4 +141,4 @@ private StringHandle GetNamespaceForType(Type type)
return type.IsNested ? default : GetOrAddString(type.Namespace);
}
}
}
}