Commit Graph

3 Commits

Author SHA1 Message Date
Kabir Oberai
d4ee05051e [Parse] Fix nested ifConfig compiler checks (#74415)
The parser is supposed to avoid looking inside unmatched `#if` compiler (et al) blocks.
This usually means that the following code builds fine

  #if compiler(>=100)
  foo bar
  #endif
  
however, a logical bug meant that if the check was nested inside an already-inactive
`#if` block, it would not adhere to this evaluation-skipping behavior

  #if false
  #if compiler(>=100)
  foo bar // error!
  #endif
  #endif
  
This PR fixes this specific case.
2024-06-15 00:31:24 -07:00
Daniel Martín
5d6f4f697f Run #if compiler tests also in Swift 4 mode 2018-09-08 13:26:16 +02:00
Daniel Martín
ccbc3f7dcc Add some tests for #if compiler 2018-08-26 15:40:17 +02:00