Bug 382915 - type alias?
Summary: type alias?
Status: NEW
Alias: None
Product: Xtend
Classification: Tools
Component: Backlog (show other bugs)
Version: 2.3.0   Edit
Hardware: PC Linux
: P3 enhancement with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-18 22:38 EDT by Lipeng Mising name CLA
Modified: 2012-11-08 09:06 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lipeng Mising name CLA 2012-06-18 22:38:47 EDT
https://groups.google.com/forum/?fromgroups#!topic/xtend-lang/6D1QDB1XGnY

It's not convenient when I have to use two same-name annotations in one class, especially "@Property".

Will xtend provide type alias? So we can:

      import code.google.morphia.annotations.Property as MPro

or

      type MPro = code.google.morphia.annotations.Property

Then I can:

class User {

     @Property @MPro("name")
     String name

}
Comment 1 Dénes Harmath CLA 2012-10-02 07:09:18 EDT
Type aliases would also be useful for encapsulating more complex types, e.g.:
type Result = Either<Option<Foo>, Exception>