Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3545 closed defect (fixed)

listFile returns wrong contents

Reported by: Adeel Asghar Owned by: Martin Sjölund
Priority: blocker Milestone: 1.9.4
Component: Interactive Environment Version:
Keywords: Cc:

Description

listFile returns wrong result when file names are updated via setSourceFile.

Attachments (1)

script.mos (234 bytes ) - added by Adeel Asghar 9 years ago.

Download all attachments as: .zip

Change History (7)

by Adeel Asghar, 9 years ago

Attachment: script.mos added

comment:1 by Martin Sjölund, 9 years ago

It seems setSource stuff only sets the Absyn.CLASS info, not the Absyn.ELEMENTITEM:

Absyn.Program.PROGRAM(classes = {Absyn.Class.CLASS(name = P1, partialPrefix = 0, finalPrefix = 0, encapsulatedPrefix = 0, restriction = Absyn.Restriction.R_PACKAGE(), body = Absyn.ClassDef.PARTS(typeVars = {NIL}, classAttrs = {NIL}, classParts = {Absyn.ClassPart.PUBLIC(contents = {Absyn.ElementItem.ELEMENTITEM(element = Absyn.Element.ELEMENT(finalPrefix = 0, redeclareKeywords = NONE(), innerOuter = Absyn.InnerOuter.NOT_INNER_OUTER(), specification = Absyn.ElementSpec.CLASSDEF(replaceable_ = 0, class_ = Absyn.Class.CLASS(name = M1, partialPrefix = 0, finalPrefix = 0, encapsulatedPrefix = 0, restriction = Absyn.Restriction.R_MODEL(), body = Absyn.ClassDef.PARTS(typeVars = {NIL}, classAttrs = {NIL}, classParts = {Absyn.ClassPart.PUBLIC(contents = {NIL})}, ann = {NIL}, comment = NONE()), info = SourceInfo.SOURCEINFO(fileName = P2, isReadOnly = 0, lineNumberStart = 1, columnNumberStart = 12, lineNumberEnd = 1, columnNumberEnd = 26, lastEditTime = 1.446822e+09))), info = SourceInfo.SOURCEINFO(fileName = P1, isReadOnly = 0, lineNumberStart = 1, columnNumberStart = 12, lineNumberEnd = 1, columnNumberEnd = 26, lastEditTime = 1.446822e+09), constrainClass = NONE()))})}, ann = {NIL}, comment = NONE()), info = SourceInfo.SOURCEINFO(fileName = P2, isReadOnly = 0, lineNumberStart = 1, columnNumberStart = 1, lineNumberEnd = 1, columnNumberEnd = 34, lastEditTime = 1.446822e+09))}, within_ = Absyn.Within.TOP())

comment:2 by Martin Sjölund, 9 years ago

Status: newaccepted

comment:3 by Martin Sjölund, 9 years ago

I have a fix for this (which might change the testsuite results slightly). Interactive.replaceClassInElementitemlist was possible to update, so it was easier than expected.

comment:4 by Martin Sjölund, 9 years ago

Resolution: fixed
Status: acceptedclosed

Fixed in ab2a526.

Last edited 9 years ago by Martin Sjölund (previous) (diff)

comment:5 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:6 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.