Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
PUP 3.8.2, PUP 4.3.0
-
1
-
Language 2015-12-16, Language 2015-12-30
-
Bug Fix
-
This adds an error if a parameter is specified more than once for a class or resource.
Description
I think that the following is a bug:
class test ( |
$a = 'first', |
$a = 'second', |
) {
|
notice($a)
|
}
|
|
include test
|
results in:
Notice: Scope(Class[Test]): second
|
If two parameters with the same name are added to a class or resource an error should be thrown in my opinion. This would also solve the problem, that this looks like it violates the no reassignment rule.