mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11956 from ethereum/userDefinedTypesContractAccess
Allow accessing user defined value type members via contract name.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
contract C { type T is uint; }
|
||||
library L { type T is uint; }
|
||||
interface I { type T is uint; }
|
||||
contract D
|
||||
{
|
||||
C.T x = C.T.wrap(uint(1));
|
||||
L.T y = L.T.wrap(uint(1));
|
||||
I.T z = I.T.wrap(uint(1));
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
contract C { type T is uint; }
|
||||
library L { type T is uint; }
|
||||
contract D
|
||||
{
|
||||
C.T x = L.T.wrap(uint(1));
|
||||
}
|
||||
// ----
|
||||
// TypeError 7407: (86-103): Type user defined type T is not implicitly convertible to expected type user defined type T.
|
||||
Reference in New Issue
Block a user