Opened 4 years ago

Closed 4 years ago

#10899 closed bug (fixed)

Polytype accepted in RHS of default associated type

Reported by: goldfire Owned by: goldfire
Priority: normal Milestone: 7.10.3
Component: Compiler Version: 7.10.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: indexed-types/should_fail/T10899
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D1262
Wiki Page:


This hogwash is accepted:

class C a where
  type F a
  type F a = forall m. m a

I will fix.

Change History (4)

comment:1 Changed 4 years ago by goldfire

Differential Rev(s): Phab:D1262
Status: newpatch

comment:2 Changed 4 years ago by Richard Eisenberg <eir@…>

In e27b267/ghc:

Perform a validity check on assoc type defaults.

This fixes #10817 and #10899. A knock-on effect is that we must
now remember locations of associated type defaults for error
messages during validity checking. This isn't too bad, but it
increases the size of the diff somewhat.

Test cases: indexed-types/should_fail/T108{17,99}

comment:3 Changed 4 years ago by goldfire

Status: patchmerge
Test Case: indexed-types/should_fail/T10899

It's worth merging this one.

comment:4 Changed 4 years ago by bgamari

Resolution: fixed
Status: mergeclosed
Note: See TracTickets for help on using tickets.