Ticket #116 (new defect)

Opened 18 months ago

Last modified 12 months ago

Functional method should not be returned as the result of a dotted reference.

Reported by: jmaessen Owned by: dr2chase
Priority: major Milestone:
Component: interpreter Version:
Keywords: Cc:

Description

Take a look at source:trunk/ProjectFortress/not_passing_yet/GeneratorNullPointer.fss and note the dotted references to g1.seq and g2.seq (this is the test case for #115). In both cases these dotted references result in a FieldRef AST node, and when run using forFieldRefCommon in Evaluator the environment is searched -- to yield the closure of the functional method seq! This is clearly wrong, and likely means we need to separate these namespaces somehow (possibly by mangling the name of the dotted method called by the functional method so we can't obtain it via an ordinary field reference, possibly in some other fashion).

I still haven't figured out why this causes a knock-on failure with a null pointer. It's possible this dotted method has no type information? Will investigate this failure mode further for #115, but meanwhile this bug is separable and should be fixed as well.

Change History

Changed 17 months ago by jmaessen

The test is now in source:trunk/ProjectFortress/tests/GeneratorNullPointer.fss and while it no longer fails with a null pointer exception, the dotted reference to seq is still passed through without complaint. This ought to fail with some meaningful error message.

Note: See TracTickets for help on using tickets.