vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
533 stars 89 forks source link

`access` ignores a function if there is a type with the same name #417

Closed charlesstaats closed 5 months ago

charlesstaats commented 6 months ago

Example code:

structfunction.asy:

struct a { }

a a() { return new a; }

a b() = a;

structfunctioncaller.asy:

from structfunction access a;
from structfunction access b;

a x = new a;  // works
a x = b();  // works
a x = a();  // doesn't work (but should)

Running asy structfunctioncaller gives the following:

a x = a();  // doesn't work (but should)
      ^
structfunctioncaller.asy: 6.7: no matching variable 'a'
johncbowman commented 5 months ago

Thanks, Charles. This is fixed in reversion 8652763972c48b7675d7a8707499311c1d1a5030.