miniscript icon indicating copy to clipboard operation
miniscript copied to clipboard

Type error while looking up map value

Open juh9870 opened this issue 3 years ago • 2 comments

Code to replicate:

a = {}
a.b = {}
a.b.c = {}
(@a.b).c

image

juh9870 avatar Dec 20 '22 20:12 juh9870

The mystery deepens: the map reference returns the appropriate value when the index is in bracket notation.

a.b = {}
a.b.c = {}
(@a.b).c
(@a.b)["c"]

MiniScript Issue 70 Capture

nealg42 avatar Sep 20 '23 02:09 nealg42

Confirmed that this behavior exists in both C++ and C#. And it only happens with (@a.b).c, not with (a.b).c.

So, this is a legitimate bug, though in an edge-case syntax that I can think of no practical use for. Going to keep it open, but not prioritize it for this next (minor) update.

JoeStrout avatar Oct 31 '23 21:10 JoeStrout