#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)
Change History (7)
by , 10 years ago
| Attachment: | script.mos added |
|---|
comment:1 by , 10 years ago
comment:2 by , 10 years ago
| Status: | new → accepted |
|---|
comment:3 by , 10 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.
Note:
See TracTickets
for help on using tickets.

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())