SkipLabs/skip

[skc] Suspicious handling of `@synonym`

Opened this issue · 0 comments

According to the error message (Did you mean uppercase, uppercase or uppercase?), the handling of @synonym seems broken.

  File "src/build_runner.sk", line 264, characters 26-47:
  The field upper is undefined. Did you mean uppercase, uppercase or uppercase?
  262 |       | Some(bs_unit) ->
  263 |         this.build_script_outputs[bs_unit].metadata.each((k, v) ->
  264 |           cmd.env(`DEP_${dep.pkg.name().upper()}_${k}`, v)
      |                          ^^^^^^^^^^^^^^^^^^^^^^
  265 |         )

for

# prelude/src/core/primitives/String.sk
[...]
 444 │ @synonym("toUpperCase")                                                                                                 
 445 │ @synonym("toUpper")                                                                                                     
 446 │ @synonym("upper")                                                                                                       
 447 │ @synonym("uppercased")                                                                                                  
 448 │ @synonym("upcase")                                                                                                      
 449 │ @synonym("uc")                                                                                                          
 450 │ fun uppercase(): String {                                                                                               
 451 │ │ String::fromChars(this.getIter().map(c → c.capitalize()).collect(Array))                                              
 452 │ }   
[...]