mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
show conflict if move as enum would change the semantics (IDEA-163248)
This commit is contained in:
@@ -1,2 +1,5 @@
|
||||
public class B {
|
||||
{
|
||||
Object o = A.ONE;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
public class B {
|
||||
public static final String ONE = "";
|
||||
public static final String ONE = "";
|
||||
{
|
||||
Object o = ONE;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -119,7 +119,13 @@ public class MoveMembersTest extends MultiFileTestCase {
|
||||
}
|
||||
|
||||
public void testEnumConstantFromCaseStatement() throws Exception {
|
||||
doTest("B", "A", 0);
|
||||
try {
|
||||
doTest("B", "A", 0);
|
||||
fail("Conflict expected");
|
||||
}
|
||||
catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
|
||||
assertEquals("Enum type won't be applicable in the current context", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void testStringConstantFromCaseStatement() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user