Couldn't resolve reference to JvmIdentifiableElement '*'.

505 views
Skip to first unread message

Thomas Olbrich

unread,
May 6, 2012, 8:41:54 AM5/6/12
to Xtend Programming Language
I tried the xtend tutorial and added a new class.
The new class should not compile with following error:

Multiple markers at this line
- Couldn't resolve reference to JvmIdentifiableElement '*'.
- Missing error message for
org.eclipse.xtext.xbase.validation.IssueCodes.invalid_generic_argument_types

What's wrong?

package xtend.tutorial

class Time {

new() { _ms = 0}
new( long ms) { _ms = ms}
new( double ms) {_ms = Math::round( ms)}
new( Time other) {}

long _ms
def long getMs() { return _ms}

def operator_plus( double ms) { new Time( ms * _ms) }

def Time alignTime( long msPerFrame) {
val long newTime = Math::round( (this.ms as double) / msPerFrame)
val long x = newTime * msPerFrame // <-- error on this line
new Time( x)
}

}

Environment:
OS is Debian Squeeze
I have download eclipse 64-Bit Linux from http://www.eclipse.org/xtend/#download
and created the xtend-tutorial project


Jan Köhnlein

unread,
May 7, 2012, 5:20:55 AM5/7/12
to xtend...@googlegroups.com
The Xtend runtime library has to be on the classpath of your project, such that it can find the definition of the operator '*'. You can simply add the Xtend library container in the build path properties of our Java project.
--
Dr. Jan Köhnlein
Senior Software Architekt

Mobile: +49 (0) 151 / 17396687
Telefon: +49 (0) 431 / 99026870
Fax: +49 (0) 431 / 99026872

http://www.itemis.de
jan.ko...@itemis.de
https://www.xing.com/profile/Jan_Koehnlein

itemis AG
Niederlassung Kiel
Am Germaniahafen 1
24143 Kiel
http://www.itemis.de/

Rechtlicher Hinweis:

Amtsgericht Dortmund, HRB 20621

Vorstand: Jens Wagener (Vors.), Wolfgang Neuhaus, Dr. Georg Pietrek, Jens Trompeter, Sebastian Neus

Aufsichtsrat: Dr. Burkhard Igel (Vors.), Stephan Grollmann, Michael Neuhaus

Sven Efftinge

unread,
May 7, 2012, 5:21:15 AM5/7/12
to xtend...@googlegroups.com
You've hitten a bug in the compiler which has already been fixed.
Your code compiles just fine with the latest head (there will be a consumable milestone (M7) on Wednesday).

Sorry,
Sven
Reply all
Reply to author
Forward
0 new messages