Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot unify final and non-final fields when using Vector #25

Open
serjek opened this issue Feb 20, 2023 · 0 comments
Open

Cannot unify final and non-final fields when using Vector #25

serjek opened this issue Feb 20, 2023 · 0 comments

Comments

@serjek
Copy link
Contributor

serjek commented Feb 20, 2023

Haxe 4.2.5

var data:tink.pure.Vector<{final whatever:Int;}> = tink.pure.Vector.fromArray([{whatever:42}]);

this gives following compilation error:

src/MainClient.hx:31: characters 47-90 : error: Cannot unify final and non-final fields
src/MainClient.hx:31: characters 47-90 : ... have: tink.pure.Vector<{ whatever: Dynamic }>
src/MainClient.hx:31: characters 47-90 : ... want: tink.pure.Vector<{ whatever: Dynamic }>
src/MainClient.hx:31: characters 47-90 : ... For function argument 'compute'
src/MainClient.hx:31: characters 47-90 : ... For function argument 'fn'

Using List instead of Vector fixes the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant