Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #424 from eed3si9n/wip/417
Fixes undercompilation on inheritance on same source
- Loading branch information
Showing
25 changed files
with
165 additions
and
31 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
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
6 changes: 6 additions & 0 deletions
6
zinc/src/sbt-test/source-dependencies/patMat-scope/src/main/scala/foo/Bar.scala
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,6 @@ | ||
package foo | ||
|
||
// This class is used to pad the number of source code. | ||
class Bar { | ||
def bar: Unit = ??? | ||
} |
6 changes: 6 additions & 0 deletions
6
zinc/src/sbt-test/source-dependencies/patMat-scope/src/main/scala/foo/Foo.scala
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,6 @@ | ||
package foo | ||
|
||
// This class is used to pad the number of source code. | ||
class Foo { | ||
def foo: Unit = ??? | ||
} |
1 change: 1 addition & 0 deletions
1
zinc/src/sbt-test/source-dependencies/sealed/incOptions.properties
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 @@ | ||
scalac.options = -Xfatal-warnings |
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
8 changes: 8 additions & 0 deletions
8
zinc/src/sbt-test/source-dependencies/trait-trait-211/build.json
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,8 @@ | ||
{ | ||
"projects": [ | ||
{ | ||
"name": "mirtest", | ||
"scalaVersion": "2.11.8" | ||
} | ||
] | ||
} |
12 changes: 12 additions & 0 deletions
12
zinc/src/sbt-test/source-dependencies/trait-trait-211/changes/A1.scala
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,12 @@ | ||
package gg | ||
package table | ||
|
||
trait A { | ||
def transform: Unit = { | ||
// the use site is updated | ||
buildNonemptyObjects(0, 1) | ||
} | ||
|
||
// add extra parameter here | ||
def buildNonemptyObjects(a: Int, b: Int): Unit = () | ||
} |
10 changes: 10 additions & 0 deletions
10
zinc/src/sbt-test/source-dependencies/trait-trait-211/mirtest/A.scala
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 @@ | ||
package gg | ||
package table | ||
|
||
trait A { | ||
def transform: Unit = { | ||
buildNonemptyObjects(0) | ||
} | ||
|
||
def buildNonemptyObjects(a: Int): Unit = () | ||
} |
9 changes: 9 additions & 0 deletions
9
zinc/src/sbt-test/source-dependencies/trait-trait-211/mirtest/B.scala
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 @@ | ||
package xx | ||
|
||
import gg.table._ | ||
|
||
trait C extends B { | ||
} | ||
|
||
trait B extends A { | ||
} |
8 changes: 8 additions & 0 deletions
8
zinc/src/sbt-test/source-dependencies/trait-trait-211/mirtest/Hello.scala
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,8 @@ | ||
package xx | ||
|
||
object Hello extends App { | ||
val consumer = new Foo | ||
consumer.transform | ||
} | ||
|
||
class Foo extends C |
1 change: 1 addition & 0 deletions
1
zinc/src/sbt-test/source-dependencies/trait-trait-211/mirtest/incOptions.properties
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 @@ | ||
relationsDebug = true |
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 @@ | ||
> mirtest/run | ||
|
||
## After copying the Good implementation, we should be able to run successfully. | ||
$ copy-file changes/A1.scala mirtest/A.scala | ||
> mirtest/run |
8 changes: 8 additions & 0 deletions
8
zinc/src/sbt-test/source-dependencies/trait-trait-212/build.json
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,8 @@ | ||
{ | ||
"projects": [ | ||
{ | ||
"name": "mirtest", | ||
"scalaVersion": "2.12.3" | ||
} | ||
] | ||
} |
12 changes: 12 additions & 0 deletions
12
zinc/src/sbt-test/source-dependencies/trait-trait-212/changes/A1.scala
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,12 @@ | ||
package gg | ||
package table | ||
|
||
trait A { | ||
def transform: Unit = { | ||
// the use site is updated | ||
buildNonemptyObjects(0, 1) | ||
} | ||
|
||
// add extra parameter here | ||
def buildNonemptyObjects(a: Int, b: Int): Unit = () | ||
} |
10 changes: 10 additions & 0 deletions
10
zinc/src/sbt-test/source-dependencies/trait-trait-212/mirtest/A.scala
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 @@ | ||
package gg | ||
package table | ||
|
||
trait A { | ||
def transform: Unit = { | ||
buildNonemptyObjects(0) | ||
} | ||
|
||
def buildNonemptyObjects(a: Int): Unit = () | ||
} |
9 changes: 9 additions & 0 deletions
9
zinc/src/sbt-test/source-dependencies/trait-trait-212/mirtest/B.scala
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 @@ | ||
package xx | ||
|
||
import gg.table._ | ||
|
||
trait C extends B { | ||
} | ||
|
||
trait B extends A { | ||
} |
8 changes: 8 additions & 0 deletions
8
zinc/src/sbt-test/source-dependencies/trait-trait-212/mirtest/Hello.scala
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,8 @@ | ||
package xx | ||
|
||
object Hello extends App { | ||
val consumer = new Foo | ||
consumer.transform | ||
} | ||
|
||
class Foo extends C |
1 change: 1 addition & 0 deletions
1
zinc/src/sbt-test/source-dependencies/trait-trait-212/mirtest/incOptions.properties
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 @@ | ||
relationsDebug = true |
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 @@ | ||
> mirtest/run | ||
|
||
## After copying the Good implementation, we should be able to run successfully. | ||
$ copy-file changes/A1.scala mirtest/A.scala | ||
> mirtest/run |
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 @@ | ||
abstract class A |
2 changes: 2 additions & 0 deletions
2
zinc/src/sbt-test/source-dependencies/transitive-class/BC.scala
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 @@ | ||
class B extends A | ||
class C extends B |
4 changes: 4 additions & 0 deletions
4
zinc/src/sbt-test/source-dependencies/transitive-class/D.scala
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,4 @@ | ||
class D extends C | ||
object Hello extends App { | ||
new D | ||
} |
3 changes: 3 additions & 0 deletions
3
zinc/src/sbt-test/source-dependencies/transitive-class/changes/A.scala
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 @@ | ||
abstract class A { | ||
def foo: String = "" | ||
} |
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 @@ | ||
> compile | ||
$ copy-file changes/A.scala A.scala | ||
> checkRecompilations 2 A B C D Hello |