Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand Documentation] Mistake in multiple dispatch example?
[Xpand Documentation] Mistake in multiple dispatch example? [message #532335] Sat, 08 May 2010 13:19 Go to next message
Abdull is currently offline Abdull
Messages: 32
Registered: May 2010
Member
In help.eclipse.org, in the Xpand Documentation, under Xpand / Xtend / Check Reference -> Expressions -> Multi methods (multiple dispatch), there is the following example given:

class MyClass {
boolean equals(Object o) {
if (o instanceof MyClass) {
return equals((MyClass)o);
}
return super.equals(o);
}
boolean equals(MyType mt) {
//implementation...
}
}


Shouldn't it say instead:
...
boolean equals(MyClass mt) {
//implementation...
}
...


Thanks, Abdull
Re: [Xpand Documentation] Mistake in multiple dispatch example? [message #532453 is a reply to message #532335] Mon, 10 May 2010 06:54 Go to previous message
Sven Efftinge is currently offline Sven Efftinge
Messages: 1762
Registered: July 2009
Senior Member
Indeed. Thanks.

Abdull schrieb:
> In help.eclipse.org,
> http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .xpand.doc/help/ch01s03.html,
> there is the following example given:
>
> class MyClass {
> boolean equals(Object o) {
> if (o instanceof MyClass) {
> return equals((MyClass)o);
> }
> return super.equals(o);
> }
> boolean equals(MyType mt) {
> //implementation...
> }
> }
> Shouldn't it say instead:
> ...
> boolean equals(MyClass mt) {
> //implementation...
> }
> ...
>
> Thanks, Abdull


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de


--
Need professional support on Xtext or Xtend?
Mail to: xtext (at) itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Previous Topic:[Xtend] Creating New Project from Ecore model from XSD
Next Topic:[Acceleo] Import a meta-model using its path
Goto Forum:
  


Current Time: Sun Sep 21 12:22:14 GMT 2014

Powered by FUDForum. Page generated in 0.02417 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software