View Issue Details

IDProjectCategoryView StatusLast Update
0000711LDMudLPC Compiler/Preprocessorpublic2018-01-29 21:57
Reporter_xtian_ Assigned ToGnomi  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Summary0000711: inline closures: context variables maybe overriding other var-types
DescriptionI encountered the following strange behaviour:


struct a {
  int blubb;
};

closure test()
{
  return function void(string s)
                   : float val; // context variable
                  {
                    struct a test= (<a>);

                    test->(s)= 9; // this will yield a compilation error
                  };
}

The interpreter yields the compile error:

line 13 before ' 9;': Illegal type for struct member name: "float"

It thinks the 's' in "text->(s)" is a float. This error goes away if I change the type of 'val' (!) from float to mixed.

My best guess is that the context variable messes up the type of the parameter variable.
TagsNo tags attached.
External Data (URL)

Activities

Gnomi

2010-01-18 16:22

manager   ~0001686

I can confirm it and will have a look into it.

Gnomi

2010-02-08 07:28

manager   ~0001711

Committed a fix for 3.5 as r2844. I will commit it for 3.3 after review/testing.

Gnomi

2011-01-25 14:59

manager   ~0001956

Committed as r2973 for 3.3 as well.

Gnomi

2011-01-25 23:17

manager   ~0001962

Fix committed in revision 6397631cca0dc05ab17a944e2036cbd5b6e801b6 to master-3.3 branch (see changeset 756 for details). Thank you for reporting!

Gnomi

2018-01-29 18:59

manager   ~0002342

Fix committed in revision 6397631cca0dc05ab17a944e2036cbd5b6e801b6 to master-3.3 branch (see changeset 2242 for details). Thank you for reporting!

Gnomi

2018-01-29 21:57

manager   ~0002393

Fix committed in revision 6397631cca0dc05ab17a944e2036cbd5b6e801b6 to master-3.3 branch (see changeset 3586 for details). Thank you for reporting!

Issue History

Date Modified Username Field Change
2010-01-16 06:18 _xtian_ New Issue
2010-01-18 16:22 Gnomi Note Added: 0001686
2010-01-18 16:22 Gnomi Assigned To => Gnomi
2010-01-18 16:22 Gnomi Status new => confirmed
2010-02-08 07:28 Gnomi Note Added: 0001711
2011-01-25 14:59 Gnomi Status confirmed => assigned
2011-01-25 14:59 Gnomi Note Added: 0001956
2011-01-25 14:59 Gnomi Status assigned => resolved
2011-01-25 14:59 Gnomi Resolution open => fixed
2011-01-25 23:17 Gnomi Source_changeset_attached => ldmud.git master-3.3 6397631c
2011-01-25 23:17 Gnomi Note Added: 0001962
2018-01-29 18:59 Gnomi Source_changeset_attached => ldmud.git master-3.3 6397631c
2018-01-29 18:59 Gnomi Note Added: 0002342
2018-01-29 21:57 Gnomi Source_changeset_attached => ldmud.git master-3.3 6397631c
2018-01-29 21:57 Gnomi Note Added: 0002393