Opened 3 years ago

Last modified 16 months ago

#12794 new bug

Out of scope error not reported

Reported by: simonpj Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.0.1
Keywords: TypeApplications Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #13834 Differential Rev(s):
Wiki Page:

Description

Consider

{-# LANGUAGE TypeApplications #-}
{-# OPTIONS -fdefer-type-errors #-}

f = bar @Int

where bar is not in scope. We get

T12768.hs:8:7: error:
    • Cannot apply expression of type ‘t1’
      to a visible type argument ‘Int’
    • In the expression: bar @Int

Confusingly, the "bar is not in scope`" error (the true error) has been suppressed.

Change History (2)

comment:1 Changed 3 years ago by goldfire

This is a variant of #12092, perhaps made worse by -fdefer-type-errors.

comment:2 Changed 16 months ago by RyanGlScott

Keywords: TypeApplications added
Note: See TracTickets for help on using tickets.