Opened 11 years ago

Closed 10 years ago

Last modified 8 years ago

#62 closed defect (fixed)

Parsing or desugaring of field initialisers is broken

Reported by: benl Owned by:
Priority: blocker Milestone:
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 (2)

comment:1 Changed 10 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 8 years ago by benl

  • Milestone 0.1.3 deleted

Milestone 0.1.3 deleted

Note: See TracTickets for help on using tickets.