Skip to content

Class methods must always mention the class variable

As mentioned in ticket:7854#comment:96716, GHC wrongfully accepts the following program. It should reject it, because op doesn't mention any type variables of Foo (the method context doesn't count).

module ShouldFail where
class Foo a where
  op :: Eq a => Int

I'm working on it.

Trac metadata
Trac field Value
Version 7.10.1-rc2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Type checker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information