Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Runtime metadata allows for array literals but not for map literals ... #3196

back2dos opened this Issue · 4 comments

2 participants


... I assume that's for historical reasons?


Map literals are just array literals with special element syntax. It doesn't make much sense without typing it and since metadata arguments are never typed the syntax is not recognized there.


Ok, let me rephrase that: would it be possible to allow map literals in runtime metadata?


I don't think so, at least not without quite some work. Allowing arrays is already stretching it because technically they are not constant values. And then maps are even worse. Sorry!

@Simn Simn closed this

Seeing that we can even have object literals as metadata arguments, your logic frankly escapes me.

Then again, given the currently allowed values one can always build some type of data structure (be it Array<{ key: K, value: V}> or Dynamic<T>) and access the data in a map like fashion through an abstract thereover.

It just seems inconsistent and not really in line with the principle of the least surprise. But I guess there's more important stuff to do ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.