This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 268783 - Cannot write .hint rule to match method references
Summary: Cannot write .hint rule to match method references
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: Dev
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-02 09:26 UTC by Jaroslav Tulach
Modified: 2016-11-03 08:30 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Tried (2.00 KB, patch)
2016-11-03 08:29 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2016-11-02 09:26:51 UTC
I am trying to avoid usage of lamdas in Truffle API while allowing it to use other features of JDK8 (like default methods):

https://github.com/jtulach/truffle/commit/4b2383f8ffaffd3e46f60aa576f872bd98f1f25e

That works for lamdas, but it turned out that one also needs to disable method references:

Runnable r = String::new;

and it seems that it is not possible to write a rule that would match this kind of expression.
Comment 1 Jaroslav Tulach 2016-11-03 08:29:43 UTC
Created attachment 162740 [details]
Tried
Comment 2 Jaroslav Tulach 2016-11-03 08:30:25 UTC
I tried to use \u003a as suggested by Jan, but `mx jackpot` doesn't detect any method literal violations.