-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test cases for a few accidentally-fixed bugs.
- scala/bug#5638 was fixed by something farther back than I can build. - scala/bug#8348 was fixed by #5251. - scala/bug#9291 was fixed by #6092.
- Loading branch information
Showing
7 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
public class Among { | ||
|
||
/** class body */ | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
object Usage { | ||
def among: Among = new Among | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1 | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package j; | ||
|
||
public @interface TableColumn { | ||
int width() default -1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|
||
} |