#8 closed defect (fixed)
Symbol resolution fails for primitive return value types
Reported by: | phdmakk | Owned by: | phdmakk |
---|---|---|---|
Priority: | major | Milestone: | v1.0.x Series |
Component: | Common | Version: | 1.0 |
Keywords: | Cc: |
Description (last modified by phdmakk)
In the following example:
module test { type component SOME_CT { // var integer vg_someVar := 0; } function f() runs on SOME_CT return integer { return vg_someVar; } }
Trying to resolve vg_someVar results in a crash while trying to find a corresponding enumerated value when the symbol cannot be resolved otherwise, producing
Exception in thread "main" java.lang.NullPointerException at de.ugoe.cs.swe.trex.core.analyzer.rfparser.symboltable.Scope.resolveEnumeratedReturnType(Scope.java:564) at de.ugoe.cs.swe.trex.core.analyzer.rfparser.symboltable.Scope.resolveEnumeratedValueNode(Scope.java:682) at de.ugoe.cs.swe.trex.core.analyzer.rfparser.symboltable.Scope.resolve(Scope.java:484) at org.etsi.t3d.visitor.VisitorCommonFunctions.getDeclarationNodeFromIdentifier(Unknown Source) at org.etsi.t3d.visitor.VisitorCommonFunctions.getDecLocationFromIdentifier(Unknown Source) at org.etsi.t3d.visitor.VisitorCommonFunctions.getReferences(Unknown Source) at org.etsi.t3d.visitor.VisitorCommonFunctions.getBehaviour(Unknown Source) at org.etsi.t3d.visitor.T3DVisitor.getModDefListBehaviour(Unknown Source) at org.etsi.t3d.visitor.T3DVisitor.getModuleBehaviour(Unknown Source) at org.etsi.t3d.visitor.T3DVisitor.visitTTCN3Module(Unknown Source) at org.etsi.t3d.visitor.AbstractVisitor.visit(Unknown Source) at org.etsi.t3d.visitor.AbstractVisitor.searchASTDepthFirst(Unknown Source) at org.etsi.t3d.visitor.AbstractVisitor.searchASTDepthFirst(Unknown Source) at org.etsi.t3d.visitor.AbstractVisitor.acceptDFS(Unknown Source) at org.etsi.t3d.T3D.run(Unknown Source) at org.etsi.t3d.T3D.main(Unknown Source)
Reported by Gustaf Johansson (Ericsson)
Change History (3)
comment:1 Changed 14 years ago by phdmakk
- Status changed from new to accepted
comment:2 Changed 14 years ago by phdmakk
- Resolution set to fixed
- Status changed from accepted to closed
comment:3 Changed 14 years ago by phdmakk
- Description modified (diff)
Note: See
TracTickets for help on using
tickets.
This issue affects both T3D and T3Q. It is an upstream issue in TRex resulting from an unchecked case where the return type is a primitive type.