Comments (5)
Please note that hxcs
is just a tool called by haxe to discover and invoke C# compiler on haxe-generated c# code, so issues like this should go to the haxe repository.
Anyway, I don't understand what errors or warnings are you expecting? It's true that C# interfaces doesn't support variables, so they are not present in the generated interface. For accessing variables through interface, Haxe generates a reflection call. This is arguably not very good performance-wise, but it's still correct. If you have any suggestions regarding that - please open a new issue on Haxe repository.
from hxcs.
@Simn @waneck could you close this please?
from hxcs.
You've got the power!
from hxcs.
@nadako
public var myInterface:IMyInterface;
<...>
myInterface.myVariable = 1; //whole this line will just disappear. No reflections. nothing.
from hxcs.
that's not true:
interface IMyInterface {
var myVariable:Int;
}
class Main {
static var myInterface:IMyInterface;
static function main() {
myInterface.myVariable = 1;
}
}
generated c#:
public static void main() {
unchecked {
global::haxe.lang.Runtime.setField_f(global::Main.myInterface, "myVariable", 1452177864, ((double) (1) ));
}
}
so we're gonna need a reproducible example
from hxcs.
Related Issues (20)
- Using mono compiler on windows? HOT 4
- A protected setter on a property causes hxcs/net-lib to generate invalid C# HOT 1
- How to define or pass dll "config" information for mac systems?
- .NET 4.5 mscorlib.dll cannot be read. HOT 7
- Utf8.compare() is broken HOT 2
- EReg.matched() doesn't throw exception for non-existing group HOT 2
- Using msbuild/xbuild instead of directly using C# compilers? HOT 1
- Generic type definition not working fine HOT 1
- static fields initialization HOT 3
- Fields initialization
- Extending StringMap not working as expected - CS - copied from Main Haxe Issues HOT 2
- Strange native compilation error on travis
- UWP target. Compilation errors
- Properly transpile constraints into C# code? HOT 2
- .NET Core Support HOT 15
- A request stop all after writeProject() HOT 3
- PeReader.Error_message("This PE file does not have managed content") HOT 5
- You need to define 'unsafe' to be able to use unsafe code in hxcs in dotnet 5.0
- missing HttpClient HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hxcs.