Skip to content

Commit a47ce3b

Browse files
committed
Fix for using C# 8.0 projects (e.g. UWP projects stuck on .NET Core 3) - fixes #376
1 parent 9d1a525 commit a47ce3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CommunityToolkit.Mvvm.SourceGenerators/ComponentModel/ObservablePropertyGenerator.Execute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ private static FieldDeclarationSyntax CreateFieldDeclaration(string typeName, st
978978
.AddVariables(
979979
VariableDeclarator(Identifier(propertyName))
980980
.WithInitializer(EqualsValueClause(
981-
ImplicitObjectCreationExpression()
981+
ObjectCreationExpression(IdentifierName(typeName))
982982
.AddArgumentListArguments(Argument(
983983
LiteralExpression(SyntaxKind.StringLiteralExpression, Literal(propertyName))))))))
984984
.AddModifiers(

0 commit comments

Comments
 (0)