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
Depends on:
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:

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):

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]
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.