Repository navigation
fix build conditions - #2111
fix build conditions#2111viceice wants to merge 1 commit into
Conversation
|
I'm not sure if this is the change we want. Generally we want to to check that it's at least |
|
maybe it's better to use a built-in conditional.
|
|
I believe the original was from Microsoft documentation. Can you specify the actual problem? |
|
|
|
If I change Jint.Tests.Test262 to target |
|
ok, will try to create a minimal reproduction |
|
Can reproduce it: diff --git a/Jint.Tests/Runtime/TypedArrayInteropTests.cs b/Jint.Tests/Runtime/TypedArrayInteropTests.cs
index ce0a4a216..ae49261ac 100644
--- a/Jint.Tests/Runtime/TypedArrayInteropTests.cs
+++ b/Jint.Tests/Runtime/TypedArrayInteropTests.cs
@@ -1,3 +1,5 @@
+using Jint.Native;
+
namespace Jint.Tests.Runtime;
public class TypedArrayInteropTests
@@ -133,6 +135,10 @@ public class TypedArrayInteropTests
var fromEngine = engine.GetValue("testSubject");
Assert.True(fromEngine.IsFloat16Array());
Assert.Equal(source, fromEngine.AsFloat16Array());
+
+ engine.SetValue("testFunc", new Func<JsTypedArray, JsTypedArray>(v => v));
+
+ Assert.Equal(source, engine.Evaluate("testFunc(testSubject)").AsFloat16Array());
}
#endif
Test output |
|
I believe the actual issue was fixed with #2121 |
looks good ❤️ |
The current conditions are wrong and don't work as intended
That's why
new Float16Array(2)throws onnet8.0