Ticket #143 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Can't initialize a structural typed variable

Reported by: etierney Assigned to: anonymous
Type: defect Priority: major
Milestone: Component: RefImpl
Version: 4 Keywords:
Cc: jeffdyer, graydon, lth, brendan

Description

This code:

type A = { i:int };
var p : A = {i:5}:A;

produces an EvalError?:

**ERROR** EvalError?: typecheck failed, val=obj type={i: [ns intrinsic]::int } wanted={i: [ns intrinsic]::int } (near builtins/Object.es:65.27-65.28)

Which seems to be saying that the actual and expected types are the same, so the typecheck probably shouldn't have failed.

Attachments

Change History

Changed 1 year ago by brendan

  • cc changed from jeffdyer to jeffdyer, graydon, lth, brendan

Still failing with the latest (type closure branch landed) RI.

/be

Changed 1 year ago by graydon

  • status changed from new to closed
  • resolution set to fixed

Fixed in revision bc2eed...

Note: See TracTickets for help on using tickets.