-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Closed
Copy link
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorsi/regressionThis issue described a confirmed regression on a currently supported versionThis issue described a confirmed regression on a currently supported versionplatform/androidplatform/iosplatform/windowsregressed-in-10-rc2s/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't workingxsgXaml sourceGenXaml sourceGen
Milestone
Description
Description
cc @simonrozsival, c.f. discussion in MauiVerse Discord
Given the following xaml:
<Entry Text="{Binding SomeNullableObject.SomeStringProperty}"/>using <MauiXamlInflator>SourceGen</MauiXamlInflator>
this will cause a
error CS8603: Possible null reference return.
in the generated delegate
return Create(
getter: static source => source.SomeNullableObject?.SomeStringProperty,
extension.Mode,
extension.Converter,
extension.ConverterParameter,
extension.StringFormat,
extension.Source,
extension.FallbackValue,
extension.TargetNullValue);I guess this is related to #32402, where something was implemented for value types, not reference types.
I guess it should work for strings specifically, as we often want to bind nullable strings to Entry, Editor, or other wrapped custom controls.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
10.0.0-rc.2
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
No response
Affected platforms
Android, Windows, iOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorsi/regressionThis issue described a confirmed regression on a currently supported versionThis issue described a confirmed regression on a currently supported versionplatform/androidplatform/iosplatform/windowsregressed-in-10-rc2s/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't workingxsgXaml sourceGenXaml sourceGen
Type
Projects
Status
Done