Import tests.

This commit is contained in:
Daniel Kirchner 2019-09-02 11:17:57 +02:00
parent 872d21f527
commit fae0e10d26
15 changed files with 99 additions and 0 deletions

View File

@ -0,0 +1,7 @@
==== Source: a ====
contract A {}
==== Source: b ====
import "a";
struct A { uint256 a; }
// ----
// DeclarationError: (b:12-35): Identifier already declared.

View File

@ -0,0 +1,7 @@
==== Source: a ====
contract A {}
==== Source: b ====
import "a" as A;
struct A { uint256 a; }
// ----
// DeclarationError: (b:17-40): Identifier already declared.

View File

@ -0,0 +1,7 @@
==== Source: a ====
contract A {}
==== Source: b ====
import {A as b} from "a";
struct b { uint256 a; }
// ----
// DeclarationError: (b:26-49): Identifier already declared.

View File

@ -0,0 +1,7 @@
==== Source: a ====
contract A {}
==== Source: b ====
import {A} from "a";
struct A { uint256 a; }
// ----
// DeclarationError: (b:21-44): Identifier already declared.

View File

@ -0,0 +1,5 @@
==== Source: a ====
contract A {}
==== Source: b ====
import {A} from "a";
struct B { uint256 a; }

View File

@ -0,0 +1,7 @@
==== Source: a ====
struct A { uint256 a; }
==== Source: b ====
import "a";
struct A { uint256 a; }
// ----
// DeclarationError: (b:12-35): Identifier already declared.

View File

@ -0,0 +1,7 @@
==== Source: a ====
struct A { uint256 a; }
==== Source: b ====
import "a" as A;
struct A { uint256 a; }
// ----
// DeclarationError: (b:17-40): Identifier already declared.

View File

@ -0,0 +1,7 @@
==== Source: a ====
struct A { uint256 a; }
==== Source: b ====
import {A as b} from "a";
struct b { uint256 a; }
// ----
// DeclarationError: (b:26-49): Identifier already declared.

View File

@ -0,0 +1,7 @@
==== Source: a ====
struct A { uint256 a; }
==== Source: b ====
import {A} from "a";
struct A { uint256 a; }
// ----
// DeclarationError: (b:21-44): Identifier already declared.

View File

@ -0,0 +1,5 @@
==== Source: a ====
struct A { uint256 a; }
==== Source: b ====
import {A} from "a";
struct B { uint256 a; }

View File

@ -0,0 +1,7 @@
==== Source: a ====
struct A { uint256 a; }
==== Source: b ====
import "a";
contract A {}
// ----
// DeclarationError: (b:12-25): Identifier already declared.

View File

@ -0,0 +1,7 @@
==== Source: a ====
struct A { uint256 a; }
==== Source: b ====
import "a" as A;
contract A {}
// ----
// DeclarationError: (b:17-30): Identifier already declared.

View File

@ -0,0 +1,7 @@
==== Source: a ====
struct A { uint256 a; }
==== Source: b ====
import {A as b} from "a";
contract b {}
// ----
// DeclarationError: (b:26-39): Identifier already declared.

View File

@ -0,0 +1,7 @@
==== Source: a ====
struct A { uint256 a; }
==== Source: b ====
import {A} from "a";
contract A {}
// ----
// DeclarationError: (b:21-34): Identifier already declared.

View File

@ -0,0 +1,5 @@
==== Source: a ====
struct A { uint256 a; }
==== Source: b ====
import {A} from "a";
contract B {}