mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-16 02:27:18 +07:00
Create records from new (IDEA-229796)
GitOrigin-RevId: 38ffe8494d90cb7d5d83c5cfcc923259aac1e05f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3e27e828e6
commit
042c0bff53
+9
@@ -0,0 +1,9 @@
|
||||
// "Create record 'MyRecord'" "true"
|
||||
class Test {
|
||||
void foo () {
|
||||
new MyRecord<String> (1, 2);
|
||||
}
|
||||
}
|
||||
|
||||
public record MyRecord<T>(int i,int i1) {
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Create record 'MyRecord'" "true"
|
||||
class Test {
|
||||
void foo () {
|
||||
new MyRecord (1, 2);
|
||||
}
|
||||
}
|
||||
|
||||
public record MyRecord(int i,int i1) {
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Create record 'MyRecord'" "true"
|
||||
class Test {
|
||||
void foo () {
|
||||
new <caret>MyRecord<String> (1, 2);
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Create record 'MyRecord'" "true"
|
||||
class Test {
|
||||
void foo () {
|
||||
new <caret>MyRecord (1, 2);
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Create inner record 'Foo'" "true"
|
||||
public class Test {
|
||||
public static void main() {
|
||||
new Foo("bar", "baz")
|
||||
}
|
||||
|
||||
private record Foo(String bar,String baz) {
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Create inner record 'Point'" "true"
|
||||
public class Test {
|
||||
class Inner {
|
||||
void test(int x, int y) {
|
||||
new Point(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
private record Point(int x,int y) {
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Create inner record 'Foo'" "true"
|
||||
public class Test {
|
||||
public static void main() {
|
||||
new F<caret>oo("bar", "baz")
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Create inner record 'Point'" "true"
|
||||
public class Test {
|
||||
class Inner {
|
||||
void test(int x, int y) {
|
||||
new Po<caret>int(x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user