Opened 15 years ago
Last modified 15 years ago
#8 closed defect
Symbol resolution fails for primitive return value types — at Initial Version
| Reported by: | phdmakk | Owned by: | phdmakk |
|---|---|---|---|
| Priority: | major | Milestone: | v1.0.x Series |
| Component: | Common | Version: | 1.0 |
| Keywords: | Cc: |
Description
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 Gustav Johansson (Ericsson)
Note: See
TracTickets for help on using
tickets.
