Skip to content

Commit

Permalink
Update Module.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
LPeter1997 committed Nov 7, 2024
1 parent 2155163 commit 3a8e650
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Draco.Compiler/Internal/OptimizingIr/Model/Module.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ internal sealed class Module : IModule
public IDictionary<ModuleSymbol, IModule> Submodules => this.submodules;
IReadOnlyDictionary<ModuleSymbol, IModule> IModule.Submodules => this.submodules;

public IDictionary<TypeSymbol, IClass> Types => this.types;
IReadOnlyDictionary<TypeSymbol, IClass> IModule.Classes => this.types;
public IDictionary<TypeSymbol, IClass> Classes => this.classes;
IReadOnlyDictionary<TypeSymbol, IClass> IModule.Classes => this.classes;

public IReadOnlySet<FieldSymbol> Fields => this.fields;
public IReadOnlySet<PropertySymbol> Properties => this.properties;
Expand All @@ -34,7 +34,7 @@ internal sealed class Module : IModule
private readonly HashSet<PropertySymbol> properties = [];
private readonly Dictionary<FunctionSymbol, IProcedure> procedures = [];
private readonly Dictionary<ModuleSymbol, IModule> submodules = [];
private readonly Dictionary<TypeSymbol, IClass> types = [];
private readonly Dictionary<TypeSymbol, IClass> classes = [];

public Module(ModuleSymbol symbol)
{
Expand Down Expand Up @@ -81,10 +81,10 @@ public Module DefineModule(ModuleSymbol moduleSymbol)

public Class DefineType(TypeSymbol typeSymbol)
{
if (!this.types.TryGetValue(typeSymbol, out var result))
if (!this.classes.TryGetValue(typeSymbol, out var result))
{
result = new Class(typeSymbol);
this.types.Add(typeSymbol, result);
this.classes.Add(typeSymbol, result);
}
return (Class)result;
}
Expand Down

0 comments on commit 3a8e650

Please sign in to comment.