-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-Authored-By: Alejandro Dini <alete89@users.noreply.github.com>
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...ollok.tests/src/org/uqbar/project/wollok/tests/xpect/DuplicatedVariableFromImports.wlk.xt
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,21 @@ | ||
/* XPECT_SETUP org.uqbar.project.wollok.tests.xpect.WollokXPectTest END_SETUP */ | ||
|
||
import libForImports.apu | ||
import libForImports.flanders.mod | ||
import libForImports.Burns | ||
|
||
// XPECT warnings --> "There is already an imported instance variable with this name" at "apu" | ||
object apu { | ||
// XPECT warnings --> "There is already an imported instance variable with this name" at "mod" | ||
var mod = 20 | ||
|
||
method getMod() = mod | ||
} | ||
|
||
// XPECT warnings --> "There is already an imported instance variable with this name" at "Burns" | ||
class Burns { | ||
// XPECT warnings --> "There is already an imported instance variable with this name" at "mod" | ||
const mod = 5 | ||
|
||
method getMod() = mod | ||
} |
12 changes: 12 additions & 0 deletions
12
...lok.tests/src/org/uqbar/project/wollok/tests/xpect/DuplicatedVariableFromImports.wtest.xt
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 @@ | ||
/* XPECT_SETUP org.uqbar.project.wollok.tests.xpect.WollokXPectTest END_SETUP */ | ||
|
||
import libForImports.apu | ||
|
||
describe "duplicated variables" { | ||
|
||
test "with duplicated variable" { | ||
// XPECT warnings --> "There is already an imported instance variable with this name" at "apu" | ||
var apu = 2 | ||
assert.equals(apu, 2) | ||
} | ||
} |