convertToLiteralIfNeeded function
dynamic
convertToLiteralIfNeeded(
- dynamic val,
- dynamic other
Implementation
dynamic convertToLiteralIfNeeded(dynamic val, dynamic other) {
if ((val is num || val is Complex) && other is Expression) {
return Literal(val);
}
return val;
}