-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Description
I posed this question over on Stackoverflow but in the course of investigating it, I think it might be a bug. Here's a minimal test case that shows the issue:
#ecs;
namespace Test
{
internal class Class
{
#region test region
[DllImport(Constants.Lib, EntryPoint = "testfunction")]
public static extern int TestFunction(int i);
#endregion
}
}
When the region markers are in place, the DllImport + method prototype are emitted like so:
[DllImport(Constants.Lib, EntryPoint = "testfunction")] public static extern int TestFunction(int i);
(note: no newline, and #region, #endregion lines are omitted)
Whereas if you comment out the region markers, the newline is preserved:
[DllImport(Constants.Lib, EntryPoint = "testfunction")]
public static extern int TestFunction(int i);
Though the emitted code still compiles and does what it's supposed to, region markers are super useful in classes large enough to be generated by a macro system. It would be great to have them emitted, and also not affect the whitespace of the enclosed code.
Metadata
Metadata
Assignees
Labels
No labels