File tree Expand file tree Collapse file tree 4 files changed +12
-1
lines changed
src/com/goide/inspections
testData/refactor/introduce-variable Expand file tree Collapse file tree 4 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ private GoInspectionUtil() {}
3131 public static int getExpressionResultCount (GoExpression call ) {
3232 if (call instanceof GoLiteral || call instanceof GoStringLiteral || call instanceof GoBinaryExpr ||
3333 call instanceof GoUnaryExpr && ((GoUnaryExpr )call ).getSendChannel () == null || call instanceof GoBuiltinCallExpr ||
34- call instanceof GoCompositeLit || call instanceof GoIndexOrSliceExpr ) {
34+ call instanceof GoCompositeLit || call instanceof GoIndexOrSliceExpr || call instanceof GoFunctionLit ) {
3535 return 1 ;
3636 }
3737 if (call instanceof GoParenthesesExpr ) {
Original file line number Diff line number Diff line change 1+ package a
2+
3+ func a (s string ) {
4+ i := func (int , int ) {}
5+ }
Original file line number Diff line number Diff line change 1+ package a
2+
3+ func a (s string ) {
4+ fun < caret > c (int , int ) {}
5+ }
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ private void doFailureTest(String msg) {
6060 public void testDoNotSuggestKeywordBasedOnType () { doTest (); }
6161 public void testDoNotSuggestKeywordBasedOnCallName () { doTest (); }
6262 public void testDoNotSuggestNameEqualsToType () { doTest (); }
63+ public void testExtractFunctionLiteral () { doTest (); }
6364
6465 public void testExtractSingleExpressionStatement_1 () { doTest (); }
6566 public void testExtractSingleExpressionStatement_2 () { doTest (); }
You can’t perform that action at this time.
0 commit comments