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

[cs?] untyped + bad identifier = ident not supported #9940

Closed
kLabz opened this issue Nov 2, 2020 · 4 comments · Fixed by #11551
Closed

[cs?] untyped + bad identifier = ident not supported #9940

kLabz opened this issue Nov 2, 2020 · 4 comments · Fixed by #11551
Labels
error-reporting platform-cs Everything related to c#
Milestone

Comments

@kLabz
Copy link
Contributor

kLabz commented Nov 2, 2020

Found this by making a typo. Got no error from haxe compiler, but C# compilation failed:

class Main {
  public static function main() {
    untyped __cs__('System.Console.WriteLine({0})', missingIdentifier.someField);
    // => System.Console.WriteLine(global::haxe.lang.Runtime.getField([ ident not supported ], "someField", 968994086, true));
  }
}
@RealyUniqueName
Copy link
Member

I think we can emit a compilation error in this case. Any other ideas?

@RealyUniqueName RealyUniqueName added the platform-cs Everything related to c# label Nov 2, 2020
@RealyUniqueName RealyUniqueName added this to the Backlog milestone Nov 2, 2020
@kLabz
Copy link
Contributor Author

kLabz commented Nov 2, 2020

Yeah, catching the error on haxe side sounds great

@kLabz
Copy link
Contributor Author

kLabz commented Nov 3, 2020

We might "just" need a proper cs.Syntax.code() to replace untyped __cs__(...)?

@RealyUniqueName
Copy link
Member

That too. But untyped __cs__ won't get removed in the nearest future anyway.

@Simn Simn modified the milestones: Backlog, Later Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error-reporting platform-cs Everything related to c#
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants