Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular references between typedef don't detect problem between 3 typedef #1295

Closed
smedilol opened this issue Mar 4, 2019 · 0 comments
Closed
Assignees
Labels
Bug Types User Visible Visible by the end user. Useful to priorize issue

Comments

@smedilol
Copy link
Contributor

smedilol commented Mar 4, 2019

Describe the bug
Our current circular references don't detect problem when they are more than 2 typedef in a circular reference.

To Reproduce
The following circular reference is detected correctly:

01 A1 typedef strict
   05 var1 type B1.

01 B1 typedef strict
   05 var2 type A1.

But not this one:

01 A1 typedef strict
   05 var3 type B1.

01 B1 typedef strict
   05 var4 type C1.

01 C1 typedef strict
   05 var5 type A1.

Expected behavior
Detect circular references between any number of Typedef.

@smedilol smedilol added Bug Types User Visible Visible by the end user. Useful to priorize issue labels Mar 4, 2019
@smedilol smedilol added this to the v1.3.1 milestone Mar 4, 2019
@smedilol smedilol self-assigned this Mar 4, 2019
osmedile added a commit to osmedile/TypeCobol that referenced this issue Mar 28, 2019
osmedile added a commit to osmedile/TypeCobol that referenced this issue Mar 30, 2019
osmedile added a commit to osmedile/TypeCobol that referenced this issue Apr 1, 2019
osmedile added a commit to osmedile/TypeCobol that referenced this issue Apr 2, 2019
…ypeCobolTeam#1327 Fix Global scope

TypeCobol refactoring but doesn't change its goals:
- Resolve type reference
- Detect circular reference between typedef
- Register link between type and variable in SymbolTable

TypeCobolLinker is now in CrossCheck phase.
It doesn't check/link dependencies directly but start Type
resolution from the main file.
This allows to fix TypeCobolTeam#1326 and TypeCobolTeam#1338.
It means the loading order of dependencies doesn't affect
the work of TypeCobolLinker.

As a TypeCobolLinker only start its work from the main
file, it means that unused Typedef and procedure in
dependencies won't be resolved anymore.
Type of used procedure will only be resolved,

WI TypeCobolTeam#1295 TypeCobolLinker can now detect circular references
between more than 2 types.
It can also handle circular references between main file
and dependencies.

WI TypeCobolTeam#1327 Fix global but it requires new TypeCobolLinker thats why it's
merged in the same commit.
The correct SymbolTable is now associated with global Node.
osmedile added a commit to osmedile/TypeCobol that referenced this issue Apr 2, 2019
osmedile added a commit to osmedile/TypeCobol that referenced this issue Apr 3, 2019
…ypeCobolTeam#1327 Fix Global scope

TypeCobol refactoring but doesn't change its goals:
- Resolve type reference
- Detect circular reference between typedef
- Register link between type and variable in SymbolTable

TypeCobolLinker is now in CrossCheck phase.
It doesn't check/link dependencies directly but start Type
resolution from the main file.
This allows to fix TypeCobolTeam#1326 and TypeCobolTeam#1338.
It means the loading order of dependencies doesn't affect
the work of TypeCobolLinker.

As a TypeCobolLinker only start its work from the main
file, it means that unused Typedef and procedure in
dependencies won't be resolved anymore.
Type of used procedure will only be resolved,

WI TypeCobolTeam#1295 TypeCobolLinker can now detect circular references
between more than 2 types.
It can also handle circular references between main file
and dependencies.

WI TypeCobolTeam#1327 Fix global but it requires new TypeCobolLinker thats why it's
merged in the same commit.
The correct SymbolTable is now associated with global Node.
osmedile added a commit to osmedile/TypeCobol that referenced this issue Apr 3, 2019
@maxime645 maxime645 mentioned this issue May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Types User Visible Visible by the end user. Useful to priorize issue
Projects
None yet
Development

No branches or pull requests

1 participant