ceylon/ceylon-compiler — Issue #265: Erasure bug with generics
Author: FroMage
Created: 2011-12-06 12:58:14+00:00
State: open
Labels: BUG

So we still have an issue with generics after #244:

```java
Correspondence c1 = {};
```

Compiles to:

```java
ceylon.language.Correspondence c1
= ceylon.language.$empty.getEmpty();
```

Which produces the following error:

> incompatible types
> found : ceylon.language.Empty
> required: ceylon.language.Correspondence
> Correspondence c1 = {};

This is because `Empty` in Java is defined as `Correspondence` which isn't erased to `Object` and since that's what we test for when introducing type casts, we're not there yet. We need a smarter test.