ceylon-ide-eclipse icon indicating copy to clipboard operation
ceylon-ide-eclipse copied to clipboard

Invalid error on default type arguments

Open bjansen opened this issue 8 years ago • 1 comments

In ceylon-ide-common, we have this interface:

shared interface AbstractTerminateStatementAction<Document=DefaultDocument>
        given Document satisfies CommonDocument {
...

And an implementation for unit tests:

class TerminateStatementActionTest()
        satisfies AbstractTerminateStatementAction<> {

Everything builds fine in the CLI, but I get these errors in Eclipse:

Description Resource Path Location Type
Some classes are missing from the generated module archives, probably because of an error in the Java backend compilation. The detail of missing classes is given in the Information markers. ceylon-ide-common Unknown Ceylon Backend Error
could not determine type of method or attribute reference: 'terminateStatement' of 'TestTerminateStatementAction' TerminateStatementActionTest.ceylon /ceylon-ide-common/test-source/test/com/redhat/ceylon/ide/common/editor line 50 Ceylon Error
type of parameter 'doc' of 'parse' declared by 'TestTerminateStatementAction' is different to type of corresponding parameter 'doc' of refined member 'parse' of 'AbstractTerminateStatementAction': type cannot be determined TerminateStatementActionTest.ceylon /ceylon-ide-common/test-source/test/com/redhat/ceylon/ide/common/editor line 64 Ceylon Error

The error goes away if I specify an explicit type argument:

class TerminateStatementActionTest()
        satisfies AbstractTerminateStatementAction<DefaultDocument> {

bjansen avatar Apr 23 '16 08:04 bjansen

One for you, @davidfestal.

gavinking avatar Apr 30 '16 18:04 gavinking