Skip to content

Commit

Permalink
fix Issues #51 and #61
Browse files Browse the repository at this point in the history
Signed-off-by: Fritz Brandhuber <[email protected]>
  • Loading branch information
brandhuf committed Mar 17, 2021
1 parent 744d02a commit 7dfbcef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace ArchUnitNET.Domain.Dependencies
{
public class ImplementsInterfaceDependency : TypeInstanceDependency
{
public ImplementsInterfaceDependency(IType origin, ITypeInstance<Interface> implementedInterface) : base(origin,
public ImplementsInterfaceDependency(IType origin, ITypeInstance<IType> implementedInterface) : base(origin,
implementedInterface)
{
}
Expand Down
2 changes: 1 addition & 1 deletion ArchUnitNET/Loader/LoadTasks/AddClassDependencies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private void AddInterfaceDependencies()
GetInterfacesImplementedByClass(_typeDefinition).ForEach(target =>
{
var targetType = _typeFactory.GetOrCreateStubTypeInstanceFromTypeReference(target);
_dependencies.Add(new ImplementsInterfaceDependency(_type, (ITypeInstance<Interface>) targetType));
_dependencies.Add(new ImplementsInterfaceDependency(_type, targetType));
});
}

Expand Down
2 changes: 1 addition & 1 deletion ArchUnitNET/Loader/TypeFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ private ITypeInstance<IType> CreateTypeFromTypeReference(TypeReference typeRefer
type = new Type(typeName, typeReference.Name, currentAssembly, currentNamespace, NotAccessible,
isNested, isGeneric, true, isCompilerGenerated);

return new TypeInstance<Class>(new Class(type));
return new TypeInstance<IType>(type);
}

var visibility = typeDefinition.GetVisibility();
Expand Down

0 comments on commit 7dfbcef

Please sign in to comment.