8000 Test cases for a few accidentally-fixed bugs. by hrhino · Pull Request #6266 · scala/scala · GitHub
[go: up one dir, main page]

Skip to content

Test cases for a few accidentally-fixed bugs. #6266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions test/files/pos/t5638/Among.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
public class Among {

/** class body */

};
3 changes: 3 additions & 0 deletions test/files/pos/t5638/Usage.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
object Usage {
def among: Among = new Among
}
10 changes: 10 additions & 0 deletions test/files/pos/t9291.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// more than one field is required to trigger crash
// there must be a default value for one of the parameters
case class OuterObject(field: Int = 1, anotherField: Int = 2)

object Test {
OuterObject().copy(field = OuterObject().field)

// declaring something without explicit type, with the same name as OuterObject.field
def field = "anything"
}
2 changes: 2 additions & 0 deletions test/files/run/t8348.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1
1
5 changes: 5 additions & 0 deletions test/files/run/t8348/TableColumn.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package j;

public @interface TableColumn {
int width() default -1;
}
15 changes: 15 additions & 0 deletions test/files/run/t8348/TableColumnImpl.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package j;

import java.lang.annotation.*;

public class TableColumnImpl implements TableColumn {
private final int width;

public TableColumnImpl(int width) { this.width = width; }

@Override public int width() { return this.width; }

@Override public Class<? extends Annotation> annotationType() {
return TableColumn.class;
}
}
9 changes: 9 additions & 0 deletions test/files/run/t8348/Test.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
object Test extends App {
import j._

val column = new TableColumnImpl(1)

println(column.width)
println((column: TableColumn).width)

}
0