Repository: dotnet/maui
File: src/Controls/src/SourceGen/CompiledBindingMarkup.cs (C#)

Code before:
			if (lbIndex != -1)
			{
				var rbIndex = p.IndexOf(']', lbIndex);
				if (rbIndex == -1)
				{
					_context.ReportDiagnostic(Diagnostic.Create(Descriptors.BindingIndexerNotClosed, GetLocation(_node)));
					return false;
				}

				var argLength = rbIndex - lbIndex - 1;
				if (argLength == 0)
				{
					_context.ReportDiagnostic(Diagnostic.Create(Descriptors.BindingIndexerEmpty, GetLocation(_node)));
					return false;
				}

				indexArg = p.Substring(lbIndex + 1, argLength);

				p = p.Substring(0, lbIndex);
				p = p.Trim();
			}

			if (p.Length > 0)
			{
				// Try to find property or infer from RelayCommand method or ObservableProperty attribute
				if (!previousPartType.TryGetProperty(p, _context, out var property, out var currentPropertyType, out var isObservableProperty) 
					|| currentPropertyType is null)
				{
					// Report as WARNING (not Error) because the property might be generated by another source generator
					// that runs after the MAUI XAML source generator. The binding will fall back to reflection at runtime.
					// This allows scenarios like CommunityToolkit.Mvvm's [ObservableProperty] to work correctly.
					_context.ReportDiagnostic(Diagnostic.Create(Descriptors.BindingPropertyNotFound, GetLocation(_node), p, previousPartType.ToFQDisplayString()));
					return false;
				}

				// TODO: detect if the type is annotated or not
				var enabledNullable = true;
				// var enabledNullable = previousPartType.NullableAnnotation == NullableAnnotation.Annotated
				// 	|| previousPartType.GetAttributes().Any(a => a.AttributeClass?.ToFQDisplayString() == "global::System.Runtime.CompilerServices.NullableContextAttribute"
				// 		&& a.ConstructorArguments.Length == 1
				// 		&& a.ConstructorArguments[0].Value is int nullableContextValue
				// 		&& nullableContextValue > 0);
				var memberIsNullable = currentPropertyType.IsTypeNullable(enabledNullable);
				isNullable |= memberIsNullable;

				IPathPart memberAccess = new MemberAccess(p, currentPropertyType.IsValueType);
				if (previousPartIsNullable)
				{
					memberAccess = new ConditionalAccess(memberAccess);
				}


Review comment (suggestion):
```suggestion
				if (!previousPartType.TryGetProperty(p, _context, out var property, out var currentPropertyType, out var isAssumedWritable) 
```

Code after:
			if (lbIndex != -1)
			{
				var rbIndex = p.IndexOf(']', lbIndex);
				if (rbIndex == -1)
				{
					_context.ReportDiagnostic(Diagnostic.Create(Descriptors.BindingIndexerNotClosed, GetLocation(_node)));
					return false;
				}

				var argLength = rbIndex - lbIndex - 1;
				if (argLength == 0)
				{
					_context.ReportDiagnostic(Diagnostic.Create(Descriptors.BindingIndexerEmpty, GetLocation(_node)));
					return false;
				}

				indexArg = p.Substring(lbIndex + 1, argLength);

				p = p.Substring(0, lbIndex);
				p = p.Trim();
			}

			if (p.Length > 0)
			{
				// Try to find property or infer from RelayCommand method or ObservableProperty attribute
				if (!previousPartType.TryGetProperty(p, _context, out var property, out var currentPropertyType, out var isAssumedWritable) 
					|| currentPropertyType is null)
				{
					// Report as WARNING (not Error) because the property might be generated by another source generator
					// that runs after the MAUI XAML source generator. The binding will fall back to reflection at runtime.
					// This allows scenarios like CommunityToolkit.Mvvm's [ObservableProperty] to work correctly.
					_context.ReportDiagnostic(Diagnostic.Create(Descriptors.BindingPropertyNotFound, GetLocation(_node), p, previousPartType.ToFQDisplayString()));
					return false;
				}

				// TODO: detect if the type is annotated or not
				var enabledNullable = true;
				// var enabledNullable = previousPartType.NullableAnnotation == NullableAnnotation.Annotated
				// 	|| previousPartType.GetAttributes().Any(a => a.AttributeClass?.ToFQDisplayString() == "global::System.Runtime.CompilerServices.NullableContextAttribute"
				// 		&& a.ConstructorArguments.Length == 1
				// 		&& a.ConstructorArguments[0].Value is int nullableContextValue
				// 		&& nullableContextValue > 0);
				var memberIsNullable = currentPropertyType.IsTypeNullable(enabledNullable);
				isNullable |= memberIsNullable;

				IPathPart memberAccess = new MemberAccess(p, currentPropertyType.IsValueType);
				if (previousPartIsNullable)
				{
					memberAccess = new ConditionalAccess(memberAccess);
				}