Ticket #62 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Parsing or desugaring of field initialisers is broken

Reported by: benl Owned by:
Priority: blocker Milestone: 0.1.3
Component: Source Desugarer Version: 0.1.2
Keywords: Cc:


For this code:

data Rover %r %i %s
 = Rover {
    turnSpeedHardMax:: Float %i;
    .homePos :: List %r (Int %r) 	= [1, 2, 3];
    .turn    :: Bool %i 		= True;
--  .turn    :: Bool %i 		= id True; --- adding an id makes it work

We get:

    Type mismatch during unification.
          cannot match: *151 -(!154 $155)> *152
                  with: Data.Bool.Bool %157

          definition of field turn of 'Test.Rover' in type 'Test.Rover'
                      at: ./test/Broken-skip/T62-ParseFieldInitialisers/Test.ds:3:0

        conflicts with, 
              the use of: True
                 at type: Data.Bool.Bool %157
                      at: ./test/Broken-skip/T62-ParseFieldInitialisers/Test.ds:7:26

Adding an bogus application of id to True makes it work for some reason.

Test is T62-ParseFieldInitialisers

Change History

Changed 8 years ago by anonymous

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.