Skip to content

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

@matthid

Description

@matthid

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions