Skip to content

Commit

Permalink
add tests for #1111
Browse files Browse the repository at this point in the history
Co-Authored-By: Alejandro Dini <alete89@users.noreply.github.com>
  • Loading branch information
nicovio and alete89 committed Aug 27, 2019
1 parent cb6de6f commit a09d16a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
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
}
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)
}
}

0 comments on commit a09d16a

Please sign in to comment.