cloudsmith/geppetto — Issue #227: Flag intra parameter declaration list references as errors
Author: hlindberg
Created: 2011-11-01 13:18:05+00:00
State: open
Labels: validator

In this case:
class selfref($selfa=10, $selfb=$selfa) { }

Geppetto correctly flags the reference to $selfa with a warning (unknown). But if it is qualified and looked up in the overall index, the two problemantic declarations below are not flagged:

class selfref($selfa=10, $selfb=$selfref::selfa) { }
class selfref($selfa=10, $selfb=$selfref::selfb) { }

In puppet runtime (possibly due to the evaluation order of hashes), a construct where previously declared parameters (or even parameters declared after the referencing value) may have values - but this is by pure chance. Geppetto should flag all such cases as errors.