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

Summary: Cannot write .hint rule to match method references
Product: java Reporter: Jaroslav Tulach <jtulach>
Component: HintsAssignee: Jan Lahoda <jlahoda>
Status: NEW ---    
Severity: normal CC: sdedic
Priority: P2    
Version: Dev   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Tried

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.