diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-09-06 17:09:33 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2024-09-06 17:09:33 +0800 |
commit | 7c481f57c407f7e4d0b359a3cfbce66add99ec2f (patch) | |
tree | d9e9a8ca7aba039f9324a21eaea8a584b590cb20 /test/type_inference | |
parent | 1ea4c04bdc392db66a36f521a5c256dbd837583b (diff) | |
download | lua-language-server-7c481f57c407f7e4d0b359a3cfbce66add99ec2f.zip |
Infer the parameter types of a same-named function in the subclass based on the parameter types in the superclass function.
Diffstat (limited to 'test/type_inference')
-rw-r--r-- | test/type_inference/common.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/type_inference/common.lua b/test/type_inference/common.lua index 4a29454a..11fa39b8 100644 --- a/test/type_inference/common.lua +++ b/test/type_inference/common.lua @@ -4428,3 +4428,16 @@ TEST 'A' [[ local x local <?y?> = 1 >> x ]] + +TEST 'number' [[ +---@class A +local A = {} + +---@param x number +function A:func(x) end + +---@class B: A +local B = {} + +function B:func(<?x?>) end +]] |