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

Some issues I have found in a real life example #10

Open
matthid opened this issue Jun 20, 2019 · 1 comment
Open

Some issues I have found in a real life example #10

matthid opened this issue Jun 20, 2019 · 1 comment

Comments

@matthid
Copy link
Contributor

matthid commented Jun 20, 2019

File: https://github.com/dotnet/roslyn/blob/master/src/Compilers/Core/Portable/CvtRes.cs

Issues:

  • using BYTE = System.Byte; should probably be type BYTE = System.Byte instead of open System.Byte
  • sizeof(DWORD) currently UnknownNode should be sizeof<DWORD>
  • Property intitializer:
    new RESOURCE()
                  {
                      HeaderSize = cbHdr,
                      DataSize = cbData
                  };
    
  • do-while loop
    do
                  {
                      sb.Append(curChar);
                      curChar = fhIn.ReadChar();
                  }
                  while (curChar != 0);
    
  • Binary negate operator: stream.Position <- stream.Position + 3 & ~3 -> ERROR UnknownPrefixOperator "~"
  • Generates raise new ResourceException(CodeAnalysisResources.CoffResourceInvalidSectionSize), which doesn't compile as parethesis are required (or <|)

Probably more, I'll edit as needed and might fix some of them.

@jindraivanek
Copy link
Owner

Link to sample at cs2fs online: here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants