Skip to content

Commit

Permalink
Fix one more TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotas committed Mar 25, 2023
1 parent e33895c commit efae78e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ internal void MarkTypeSystemEntity(in MessageOrigin origin, TypeSystemEntity ent
MarkEvent(origin, @event, reason);
break;
// case InterfaceImplementation
// Nothing to do currently as Native AOT will presere all interfaces on a preserved type
// Nothing to do currently as Native AOT will preserve all interfaces on a preserved type
}
}

Expand All @@ -83,6 +83,9 @@ internal bool TryResolveTypeNameAndMark(string typeName, in DiagnosticContext di
TypeDesc foundType = System.Reflection.TypeNameParser.ResolveType(typeName, callingModule, diagnosticContext.Origin.MemberDefinition!.Context, referencedModules);
if (foundType == null)
{
if (needsAssemblyName)
diagnosticContext.AddDiagnostic(DiagnosticId.TypeWasNotFoundInAssemblyNorBaseLibrary, typeName);

type = default;
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,10 @@ static void TestConstructors ()
RequireNothing (type);
}

// NativeAOT doesn't implement this yet: https://github.com/dotnet/runtime/issues/72833
[ExpectedWarning ("IL2105",
"Type 'System.Invalid.TypeName' was not found in the caller assembly nor in the base library. " +
"Type name strings used for dynamically accessing a type should be assembly qualified.",
ProducedBy = Tool.Trimmer)]
ProducedBy = Tool.Trimmer | Tool.NativeAot)]
static void TestUnqualifiedTypeNameWarns ()
{
RequirePublicConstructors ("System.Invalid.TypeName");
Expand Down

0 comments on commit efae78e

Please sign in to comment.