Skip to content
  • Sebastian Graf's avatar
    Arity: Require called *exactly once* for eta exp with -fpedantic-bottoms (#24296) · 42bee5aa
    Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
    In #24296, we had a program in which we eta expanded away an error despite the
    presence of `-fpedantic-bottoms`.
    This was caused by turning called *at least once* lambdas into one-shot lambdas,
    while with `-fpedantic-bottoms` it is only sound to eta expand over lambdas that
    are called *exactly* once.
    An example can be found in `Note [Combining arity type with demand info]`.
    
    Fixes #24296.
    42bee5aa