Skip to content

Commit

Permalink
Update ModuleCodegen.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
LPeter1997 committed Oct 27, 2024
1 parent 9ff6158 commit 133c67e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ public override void VisitField(FieldSymbol fieldSymbol)
public override void VisitProperty(PropertySymbol propertySymbol)
{
// TODO: Not flexible, won't work for non-auto props
if (propertySymbol is not SourceAutoPropertySymbol sourceAutoProp) return;
if (propertySymbol is not SyntaxAutoPropertySymbol) return;

this.module.DefineProperty(propertySymbol);

this.module.DefineProperty(sourceAutoProp);
if (propertySymbol is not SourceAutoPropertySymbol sourceAutoProp) return;

// If there's a value, compile it
if (sourceAutoProp.Value is not null)
Expand Down

0 comments on commit 133c67e

Please sign in to comment.