Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.8-beta-2
-
None
-
None
Description
Today this code produces an error:
class MyList extends ArrayList {
public MyList() {}
}
def x = [2, 3, 4] as MyList
This is because MyList does not have a constructor that takes a collection.
All collections have an addAll(Collection) method.
If the constructor fails then we should try the default constructor followed by a call to addAll.
I have the code fixed locally with test and can check in any time. Just want to get approval in case there is a backwards compatibility issue.