Comments (4)
Can you provide an example?
MakeSealedTypeGetter should construct a function that, when called, initializes the type. It shouldn't initialize the type itself when called.
from jsil.
To clarify:
Sealing of types only occurs in queued initializers, which are created at the end of each generated file. Sealing should never occur after that, so running a static constructor shouldn't cause types to become sealed.
There was a race condition of sorts where .Of(T) could be called on a generic type before it was fully defined. This caused all sorts of problems, and I could see how maybe that would make you think that things were going wrong with type sealing, but really the root problem was .Of(T) being called too early. I've worked around this by ensuring that base types are always deferred if they are generic, so that .Of(T) doesn't actually get called until after type sealing has occurred.
P.S. Fuck, I hate JavaScript.
from jsil.
Hah, okay - well I'll run this over the old version of my code that raised all these issues in the first place and see what creeps up- I've decided that I'm going to go with a solution for the SLJS project which involves re-implementing most of the SL stuff manually, too many issues in trying to bring across ported code from either moonlight or MS stuff itself. (Mainly due to the amount of native code as well as the way things are bound together)
Should make a lot progress now I've decided to write a crap load of javascript, I like writing crap loads of code. Getting to grips with the way JSIL is structured now too, so can probably contribute a bit more - it's a complex beast so it takes some time to know that the changes you're making aren't causing issues :-)
PS: I actually rather like JavaScript, quirky as it is :-)
from jsil.
The order-independence branch ( https://github.com/kevingadd/JSIL/tree/order-independence ) makes significant changes to type initialization, sealing, and assembly loading. I think it should address all of your issues here. Let me know if you get a chance to try it out (things may be horribly broken).
from jsil.
Related Issues (20)
- DCE works incorrectly for derived interface implementation
- Content Not Being Generated XNA HOT 1
- Assembly.GetType is not working for generics.
- Unsigned comparisons work incorrect
- Type.FullName is not returning correct name for generic dictionary
- Async state machine incorrect translation HOT 6
- Calling External Library From C# HOT 2
- string.IndexOf(String value, StringComparison comparisonType) not available HOT 2
- Support netstandard assemblies
- ulong math is incorrect HOT 2
- Installing JSIL on Linux HOT 2
- Support pascalabc
- InvalidCastException when using Newtonsoft.Json.dll (10.0.1 .NET 4.0) HOT 1
- Delegate.Method fails when called in constructor. HOT 3
- C# 7.2 "in" keyword in interfaces
- DateTime Object does not implement public functions
- load file
- Attribute properties are missing HOT 1
- How to Convert a CSharp Project to JavaScript on a Mac? HOT 2
- where do I find the namespace and game?
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 jsil.