Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007260OCamltypingpublic2016-05-19 15:532017-09-24 17:32
Reporternojebar 
Assigned Togarrigue 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.04.0 +dev / +beta1 / +beta2 
Summary0007260: GADT + subtyping crash
DescriptionSee the repro below. It crashes with Ctype.Unify(_). Tested with 4.02.3 and 4.03.0.

Replacing

  method foo (Dyn ty) =
    match ty with
    | Int -> (this :> bar)

by

  method foo (Dyn Int) =
    (this :> bar)

makes the crash go away.
Steps To Reproducetype bar = < bar: unit >

type _ ty = Int : int ty

type dyn = Dyn : 'a ty -> dyn

class foo =
  object (this)
    method foo (Dyn ty) =
      match ty with
      | Int -> (this :> bar)
  end
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0015959)
garrigue (manager)
2016-06-02 10:26

Fixed in trunk by commit a4e355a.

Was checking level on the wrong node in Subst.type_exp.
(0015960)
nojebar (developer)
2016-06-02 10:28

Thanks!

- Issue History
Date Modified Username Field Change
2016-05-19 15:53 nojebar New Issue
2016-06-02 10:26 garrigue Note Added: 0015959
2016-06-02 10:26 garrigue Status new => resolved
2016-06-02 10:26 garrigue Fixed in Version => 4.04.0 +dev / +beta1 / +beta2
2016-06-02 10:26 garrigue Resolution open => fixed
2016-06-02 10:26 garrigue Assigned To => garrigue
2016-06-02 10:28 nojebar Note Added: 0015960
2017-02-23 16:45 doligez Category OCaml typing => typing
2017-09-24 17:32 xleroy Status resolved => closed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker