Fix opt-lambda property on opt-lambda methods
Related to PR 14726 original commit: 3905334f28a9ffdf2d963c21f159fc1ccf642632
This commit is contained in:
parent
ccfda8d066
commit
34eeeb62bc
|
@ -1448,6 +1448,16 @@
|
|||
(syntax/loc stx core)
|
||||
(attribute kw.value))])
|
||||
m))]
|
||||
[(~and (let-values ([(meth-name:id) core]) m)
|
||||
opt:opt-lambda^)
|
||||
(match-define (list required optional) (attribute opt.value))
|
||||
(quasisyntax/loc stx
|
||||
(let-values ([(meth-name)
|
||||
#,(opt-lambda-property
|
||||
(syntax/loc stx core)
|
||||
(list (add1 required) ; for `this` argument
|
||||
optional))])
|
||||
m))]
|
||||
[_ stx]))
|
||||
|
||||
;; Set<Symbol> Set<Symbol> String -> Void
|
||||
|
|
|
@ -1505,4 +1505,14 @@
|
|||
(super-new)
|
||||
(define/public (foo [i #f]) (void))))
|
||||
(new a%))
|
||||
(-object #:method ([foo (t:-> -Integer -Void)]))]))
|
||||
(-object #:method ([foo (t:-> -Integer -Void)]))]
|
||||
[tc-e (let ()
|
||||
(define-type-alias A%
|
||||
(Class [foo (->* [] [Integer] Void)]))
|
||||
(: a% A%)
|
||||
(define a%
|
||||
(class object%
|
||||
(super-new)
|
||||
(define/public (foo [i #f]) (void))))
|
||||
(new a%))
|
||||
(-object #:method ([foo (cl->* (t:-> -Void) (t:-> -Integer -Void))]))]))
|
||||
|
|
Loading…
Reference in New Issue
Block a user