title: partial apply for closure #1
body: <p>This is my code:</p>
  <pre><code>import SwiftUI
  
  struct CalendarView: View {
      @State private var monthName: String
      @State private var dayNumber: Int
      
      init(withMonth month: Int, andDay day: Int) {
          self.dayNumber = day
          let itLocale = Locale(identifier: &quot;it_IT&quot;)
          let formatter = DateFormatter()
          formatter.locale = itLocale
          self.monthName = formatter.shortMonthSymbols[month - 1].uppercased()
      }
  
      var body: some View {
          ZStack {
              Rectangle()
                  .fill(Color.gray)
                  .frame(width: 44.5, height: 47)
                  .cornerRadius(8.0)
              
              VStack(spacing: 0) {
                  ZStack(alignment: .center) {
                      Rectangle()
                          .fill(Color.accentColor)
                          .frame(width: 44, height: 20)
                      Text(self.monthName)
                          .font(.caption)
                          .fontWeight(.bold)
                          .foregroundColor(Color.white)
                  }
                  
                  ZStack(alignment: .center) {
                      Rectangle()
                          .fill(Color.white)
                          .frame(width: 44, height: 26)
                          
                      Text(String(format: &quot;%02d&quot;, self.dayNumber))
                          .foregroundColor(Color.black)   
                  }
              }
              .cornerRadius(8.0)
          }
      }
  }
  
  struct CalendarView_Previews: PreviewProvider {
      static var previews: some View {
          CalendarView(withMonth: 4, andDay: 9)
      }
  }
  </code></pre>
  <p>This is the crash log:</p>
  <pre><code>6  SwiftUI                        0x18a0ea260 partial apply for closure #1 in ViewBodyAccessor.updateBody(of:changed:) + 40
  7  SwiftUI                        0x18a490c7c closure #1 in BodyAccessor.setBody(_:) + 52
  8  SwiftUI                        0x18a0e222c ViewBodyAccessor.updateBody(of:changed:) + 1520
  9  SwiftUI                        0x18a491158 DynamicBody.updateValue() + 492
  10 SwiftUI                        0x18a10ab34 partial apply for implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init&lt;A&gt;(_:) + 32
  </code></pre>
  <p><code>CalendarView</code> is a small view drawing an icon like macOS Calendar icon. I call this view in a loop giving month number and day number as parameters to create a list of calendar icons containing day number and first 3 letters of month name.</p>
  <p>Day and month numbers come from a working network request that always returns same list (no empty values)</p>
  <p>So far so good, when in debug mode it works flawlessly: I tested (debug) it on real iPad, iPhone and simulators with no issues, but it always fails giving a crash in release builds (TestFlight).
  I don't know why or where to start looking to fix it...</p>
  <p><strong>edit</strong>:
  Crash log above is only last part of entire log that can be found <a href="https://pastebin.com/DjXSMDY2" rel="nofollow noreferrer">here</a></p>