Text("Sample Text with wrong font type")
.font(.bold)
I know this code is incorrect, and it returns an error stating that .font doesn’t have a .bold type.
However, when I place this incorrect code within a stack…
…no error message appears. Instead, I get:
The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
when trying to run the code. It’s unclear why the compiler doesn’t specify that the issue originates from .font(.bold). This was confusing, and I spent 20 minutes figuring out it was a typo.