Skip to content

Dupliate AST nodes in Go #2658

Description

@fwendland

I've identified the following test case resources, where duplicate AST nodes occur:

  • src/test/resources/golang/branch.go
    Default[location=branch.go(19:3-20:12),type=UNKNOWN] -> 2
  • src/test/resources/golang/type_assert.go
    Reference[name=f,location=type_assert.go(23:14-23:15),type=ObjectType[name=main.MyInterface],refersTo=Variable[name=f,location=type_assert.go(14:6-14:32),initializer=InitializerList[location=type_assert.go(14:22-14:32),type=ObjectType[name=main.MyStruct],initializers=[]],modifiers=[]]] -> 4

Initial analysis:

  • In the case with the Reference it seems that the reference node is reused in each case of the switch.

Metadata

Metadata

Labels

bugSomething isn't workinggo

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions