Should also make sure ~ only applies to types
This commit is contained in:
parent
e38c185042
commit
3ef9f404b1
|
@ -141,3 +141,16 @@ testUnits (test,
|
|||
"layer1.fspl",
|
||||
`+ X:layer0::X`,
|
||||
)}
|
||||
|
||||
func TestFunctionRestrictedErr (test *testing.T) {
|
||||
testStringErr (test,
|
||||
"cannot mark function as restricted", 0, 0,
|
||||
`~ [f]`,
|
||||
)}
|
||||
|
||||
func TestMethodRestrictedErr (test *testing.T) {
|
||||
testStringErr (test,
|
||||
"cannot mark method as restricted", 0, 0,
|
||||
`T:Int
|
||||
~ T.[f]`,
|
||||
)}
|
||||
|
|
Loading…
Reference in New Issue