kekyo / IL2C

IL2C - A translator for ECMA-335 CIL/MSIL to C language.
Apache License 2.0
401 stars 36 forks source link

Support new C# styles #117

Open kekyo opened 2 years ago

kekyo commented 2 years ago

ImplicitUsing

In .NET 6 SDK cli:

dotnet new console

Source code results only 1 line:

Console.WriteLine("Hello world");

That code is placed into global namespace. IL2C currently doesn't support any global namespaces.

Nullable

Any nullable reference types don't affect any IL code, but it requires to implement by some attribute types. IL2C currently doesn't have Attribute base type.

In IL2C, it may be better to just define an Attribute type, since (for now) all attributes are simply ignored.

kekyo commented 2 years ago

In 3400c23ddaf1124e0f831cc366265e7efa2dd8f8, found same problem for global function in built net6.0 tfm. This tfm always created Main() method and assigned for entry point attribute on library assembly.

Related #119

image