Closed ebekker closed 5 years ago
BTW, I'm using what I believe is the latest stable version of the library, v1.2.9.
Don't remember, but it might work only for ScriptObject
If that's the case, is that by design?
If that's the case, is that by design?
I don't remember 😉 (currently don't have time to look into the code)
Should be fixed by commit 548998c that will be part of 2.0.1+
Based on the docs I was under the impression I can access a property of an object using either the simple dot-notation or the indexer-notation, e.g. if I have an object
foo
with a propertyname
, I thought both of these are legal:But a sample of my code that uses the indexer notation fails with this exception:
Where
att
is a global variable of the typeFoo.Model.Attribute
-- a native .NET type.Do I misunderstand the usage?
The reason I was trying to resort to the index-notation is that the
Attribute
type has a property namedNull
which surfaces asnull
in the scriban template and seemingly causes a conflict with the reserved keyword of the same name. For example, both of these are failing: