Skip to content

CreateDynamicImport(0) does not insert var before function declarations #34

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

Open
michkowalczuk opened this issue Dec 14, 2023 · 1 comment

Comments

@michkowalczuk
Copy link

michkowalczuk commented Dec 14, 2023

Below you can find a sample Chet result with CreateDynamicImport(0) directive:
Delphi can not compile it because of the lack of the var keyword before function declarations.

type
   MyEnum= (
    enum0= 0,
    enum1= 1,
    enum2= 2);
  PMyEnum = ^MyEnum;

  // more types...

  MyRecord= record
    a: Double;
    b: Double;
    c: Double;
  end;

// here should be var!

  MyFunc1: function(...): MyResult; cdecl;
  MyFunc2: function(...): MyResult; cdecl;
  // more functions...

I need to use PostProcess / InsertLine to insert var after the last type declaration.

@jarroddavis68
Copy link
Contributor

Yes, I'm aware of this. I have a build that resolves this issue. However, like I stated before, there are some corner cases, that I'm still working on before I can issue a PR.

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