title: SwiftUI: Cannot infer contextual base in reference to member
body: <p>I wrote an extension for SwiftUI Font which introduces a couple of custom fonts.</p>
  <pre class="lang-swift prettyprint-override"><code>extension Font {
      static let solDisplay: Font = .custom(&quot;Gilroy&quot;, size: 36)
      static let solHeadline: Font = .custom(&quot;Gilroy&quot;, size: 24)
  }
  </code></pre>
  <p>Now for some reason there is the following error appears during the build process: <code>Cannot infer contextual base in reference to member 'heavy'</code>.
  Interestingly this error was found by someone else while doing a Pull Request - I did not notice any of these errors locally, but it appears to happen to only some. Currently 2 out of 4 people in our team have the errors where the other ones don't.</p>
  <pre class="lang-swift prettyprint-override"><code>struct AssetsDemoPage: View {
      let fonts: [(String, Font)] = [
          (&quot;Display - Heavy&quot;, .solDisplay.weight(.heavy)),   // Error Happening here
          (&quot;Display - Light&quot;, .solDisplay),                  // No error here!
          (&quot;Headline - Heavy&quot;, .solHeadline.weight(.heavy)), // Error Happening here
          (&quot;Headline - Light&quot;, .solHeadline),                // No error here!
      ]
  
      var body: some View {
          NavigationView {
              List {
                  Section(header: Text(&quot;Fonts&quot;)) {
                      ForEach(fonts, id: \.0) { name, font in
                          Text(name)
                              .font(font)
                      }
                  }
              }
              .navigationBarTitle(Text(&quot;Assets&quot;), displayMode: .inline)
          }
      }
  }
  </code></pre>