Skip to content

Conversation

@abego
Copy link
Contributor

@abego abego commented Jul 21, 2018

Eclipse 4.7.3a reports Java problem:

'The method flatten(Node<T>, IntFunction<T[]>) in the type Nodes is not
 applicable for the arguments (Node, IntFunction)'

when compiling ReferencePipeline.java.

Cause

It looks like the compiler cannot correctly infer the (generic) types
of the method calls in the argument list of flatten.

Solution

Introduce an extra temporary variable 'node' with explicit type 'Node'
holding the value of the expression originally passed to flatten. This
way the correct types are used in the method call and the error message
disappears.

Eclipse 4.7.3a reports Java problem:

    'The method flatten(Node<T>, IntFunction<T[]>) in the type Nodes is not
     applicable for the arguments (Node, IntFunction)'

when compiling ReferencePipeline.java.

Cause
=====

It looks like the compiler cannot correctly infer the (generic) types
of the method calls in the argument list of flatten.

Solution
========

Introduce an extra temporary variable 'node' with explicit type 'Node<A>'
holding the value of the expression originally passed to flatten. This
way the correct types are used in the method call and the error message
disappears.
@abego abego requested a review from BobHanson July 22, 2018 09:25
@BobHanson
Copy link
Collaborator

BobHanson commented Jul 22, 2018 via email

BobHanson added a commit that referenced this pull request Aug 16, 2018
fixing Character.toTitleCase, [Long,Integer,Short,Byte].toString(n,radix)
@BobHanson
Copy link
Collaborator

Any more on this? It's curious that it is a Java error -- nothing to do with Java2Script, right? Or what is the test case that triggers this?

@BobHanson BobHanson merged commit ff0cda6 into java2script:master Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants