You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm opening this bug as a placeholder while I investigate further. For now I'm assigning to area-language since I don't know whether the analyzer or front end is misbehaving. When I know more, I'll update the bug description and reassign to the appropriate area.
The analyzer and the front end disagree as to whether the following code (from #48952) is erroneous:
typedefSettingOrFunc=int?Function<T>(ContainsValue<T> tag);
classContainsValue<T> {
finalT val;
ContainsValue(this.val);
}
classUsesSetting {
finalSettingOrFunc? setting;
UsesSetting({this.setting});
/// Do stuff with wrappedValue here, /// for my project, if wrappedValue is/returns null, /// default values are used otherwise uses the wrappedValue's return.
}
voidmain(List<String> args) {
UsesSetting(
setting:<num>(t) => t.val ==50?0:null, // is fine
);
UsesSetting(
setting:<num>(t) => t.val <50?0:null, // throws analysis error:// The operator '<' isn't defined for the type 'Object'.// Try defining the operator '<'. dart(undefined_operator)
);
}
The text was updated successfully, but these errors were encountered:
I'm opening this bug as a placeholder while I investigate further. For now I'm assigning to
area-language
since I don't know whether the analyzer or front end is misbehaving. When I know more, I'll update the bug description and reassign to the appropriate area.The analyzer and the front end disagree as to whether the following code (from #48952) is erroneous:
The text was updated successfully, but these errors were encountered: