File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -4102,3 +4102,29 @@ module Ambig57404
41024102 using . B
41034103end
41044104@test Ambig57404. S == 1
4105+
4106+ # #57334
4107+ let
4108+ x57334 = Ref (1 )
4109+ @test_throws " syntax: `const` left hand side \" x57334[]\" contains non-variables" Core. eval (@__MODULE__ , :(const x57334[] = 1 ))
4110+ end
4111+
4112+ # #57470
4113+ module M57470
4114+ using .. Test
4115+ @test_throws (
4116+ " syntax: `global const` declaration not allowed inside function" ,
4117+ Core. eval (@__MODULE__ , :(function f57470 ()
4118+ const global x57470 = 1
4119+ end )))
4120+ @test_throws (
4121+ " unsupported `const` declaration on local variable" ,
4122+ Core. eval (@__MODULE__ , :(let
4123+ const y57470 = 1
4124+ end ))
4125+ )
4126+ let
4127+ global const z57470 = 1
4128+ const global w57470 = 1
4129+ end
4130+ end
You can’t perform that action at this time.
0 commit comments