mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add more syntax tests for enums and interfaces/libraries
This commit is contained in:
parent
13e37df97c
commit
ce29aac8ad
@ -0,0 +1,9 @@
|
||||
interface I {
|
||||
enum Direction { Left, Right }
|
||||
}
|
||||
|
||||
contract D {
|
||||
function f() public pure returns (I.Direction) {
|
||||
return I.Direction.Left;
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
interface I {
|
||||
enum Direction { Left, Right }
|
||||
}
|
||||
|
||||
library L {
|
||||
function f() public pure returns (I.Direction) {
|
||||
return I.Direction.Left;
|
||||
}
|
||||
function g() internal pure returns (I.Direction) {
|
||||
return I.Direction.Left;
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
library L {
|
||||
enum Direction { Left, Right }
|
||||
}
|
||||
|
||||
contract D {
|
||||
function f() public pure returns (L.Direction) {
|
||||
return L.Direction.Left;
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
contract C {
|
||||
enum Direction { Left, Right }
|
||||
}
|
||||
|
||||
contract D is C {
|
||||
function f() public pure returns (Direction) {
|
||||
return Direction.Left;
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
interface I {
|
||||
enum Direction { Left, Right }
|
||||
}
|
||||
|
||||
contract D is I {
|
||||
function f() public pure returns (Direction) {
|
||||
return Direction.Left;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user