Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#10119 closed bug (fixed)

Class methods must always mention the class variable

Reported by: thomie Owned by:
Priority: normal Milestone: 8.0.1
Component: Compiler (Type checker) Version: 7.10.1-rc2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #7854, #10118 Differential Rev(s): Phab:D687
Wiki Page:

Description

As mentioned in comment:9:ticket:7854, 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.

Change History (5)

comment:1 Changed 3 years ago by thomie

Differential Rev(s): D687
Status: newpatch
Test Case: typecheck/should_fail/T10119

comment:2 Changed 3 years ago by thomie

Differential Rev(s): D687Phab:D687

comment:4 Changed 3 years ago by thomie

Resolution: fixed
Status: patchclosed
Test Case: typecheck/should_fail/T10119

Closing

comment:5 Changed 2 years ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

Note: See TracTickets for help on using tickets.