-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add extension methods restrictions to exports
Similarly to imports, we needed to extend the logic of exports to take into account qualified exports. Added a bunch of multi-level tests, fixed an existing one that shouldn't be working.
- Loading branch information
Showing
26 changed files
with
168 additions
and
21 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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
engine/runtime/src/test/resources/Test_Extension_Methods_Failure_2/package.yaml
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 @@ | ||
name: Test_Extension_Methods_Failure_2 | ||
license: APLv2 | ||
enso-version: default | ||
version: "0.0.1" | ||
author: "Enso Team <[email protected]>" | ||
maintainer: "Enso Team <[email protected]>" |
7 changes: 7 additions & 0 deletions
7
engine/runtime/src/test/resources/Test_Extension_Methods_Failure_2/src/F1.enso
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,7 @@ | ||
from Standard.Base.Data.Numbers import Integer | ||
|
||
type Foo | ||
A | ||
B | ||
|
||
Integer.foo self a = 1 + a |
2 changes: 2 additions & 0 deletions
2
engine/runtime/src/test/resources/Test_Extension_Methods_Failure_2/src/F2.enso
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 @@ | ||
from project.F1 import all | ||
from project.F1 export Foo |
4 changes: 4 additions & 0 deletions
4
engine/runtime/src/test/resources/Test_Extension_Methods_Failure_2/src/Main.enso
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 @@ | ||
from project.F2 import all | ||
|
||
main = | ||
1.foo 41 |
6 changes: 6 additions & 0 deletions
6
engine/runtime/src/test/resources/Test_Extension_Methods_Success_3/package.yaml
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 @@ | ||
name: Test_Extension_Methods_Success | ||
license: APLv2 | ||
enso-version: default | ||
version: "0.0.1" | ||
author: "Enso Team <[email protected]>" | ||
maintainer: "Enso Team <[email protected]>" |
7 changes: 7 additions & 0 deletions
7
engine/runtime/src/test/resources/Test_Extension_Methods_Success_3/src/F1.enso
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,7 @@ | ||
from Standard.Base.Data.Numbers import Integer | ||
|
||
type Foo | ||
A | ||
B | ||
|
||
Integer.foo self a = 1 + a |
2 changes: 2 additions & 0 deletions
2
engine/runtime/src/test/resources/Test_Extension_Methods_Success_3/src/F2.enso
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 @@ | ||
import project.F1 | ||
export project.F1 |
4 changes: 4 additions & 0 deletions
4
engine/runtime/src/test/resources/Test_Extension_Methods_Success_3/src/Main.enso
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 @@ | ||
from project.F2 import all | ||
|
||
main = | ||
1.foo 41 |
6 changes: 6 additions & 0 deletions
6
engine/runtime/src/test/resources/Test_Extension_Methods_Success_4/package.yaml
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 @@ | ||
name: Test_Extension_Methods_Success_4 | ||
license: APLv2 | ||
enso-version: default | ||
version: "0.0.1" | ||
author: "Enso Team <[email protected]>" | ||
maintainer: "Enso Team <[email protected]>" |
7 changes: 7 additions & 0 deletions
7
engine/runtime/src/test/resources/Test_Extension_Methods_Success_4/src/F1.enso
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,7 @@ | ||
from Standard.Base.Data.Numbers import Integer | ||
|
||
type Foo | ||
A | ||
B | ||
|
||
Integer.foo self a = 1 + a |
2 changes: 2 additions & 0 deletions
2
engine/runtime/src/test/resources/Test_Extension_Methods_Success_4/src/F2.enso
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 @@ | ||
from project.F1 import all | ||
from project.F1 export all |
4 changes: 4 additions & 0 deletions
4
engine/runtime/src/test/resources/Test_Extension_Methods_Success_4/src/Main.enso
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 @@ | ||
from project.F2 import all | ||
|
||
main = | ||
1.foo 41 |
6 changes: 6 additions & 0 deletions
6
engine/runtime/src/test/resources/Test_Import_Methods_Success/package.yaml
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 @@ | ||
name: Test_Extension_Methods_Success_4 | ||
license: APLv2 | ||
enso-version: default | ||
version: "0.0.1" | ||
author: "Enso Team <[email protected]>" | ||
maintainer: "Enso Team <[email protected]>" |
7 changes: 7 additions & 0 deletions
7
engine/runtime/src/test/resources/Test_Import_Methods_Success/src/F1.enso
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,7 @@ | ||
from Standard.Base.Data.Numbers import Integer | ||
|
||
type Foo | ||
A | ||
B | ||
|
||
bar a = 1 + a |
2 changes: 2 additions & 0 deletions
2
engine/runtime/src/test/resources/Test_Import_Methods_Success/src/F2.enso
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 @@ | ||
from project.F1 import bar | ||
from project.F1 export bar |
4 changes: 4 additions & 0 deletions
4
engine/runtime/src/test/resources/Test_Import_Methods_Success/src/Main.enso
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 @@ | ||
from project.F2 import all | ||
|
||
main = | ||
bar 41 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import project.Semantic.Deep_Export.Internal_5 | ||
|
||
from project.Semantic.Deep_Export.Internal_5 export const | ||
export project.Semantic.Deep_Export.Internal_5 |
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