xp-framework/xp-framework — pull request #232 by thekid (2013-02-06 11:57:02+00:00)
Title: Optional generic arg

This pull request fixes optional values for generic args not being supported.

Example:

```php
class Optional extends Object {
protected $value;

#[@generic(params= 'T')]
public function __construct($value= NULL) {
$this->value= $value;
}
}

create('new Optional', NULL);
```

This raises a `lang.IllegalStateException` about `NULL` not being an instance of `Date`. This is inconsistent with how PHP handles nullable type hints and if we'd written `function __construct(Date $value= NULL)` in an ungeneric case.