Open matthesinator opened 11 months ago
While the crash is due to a bug, the issue here seems to be due to the unknown type on the RHS of
openweathermap:Client myclient = check new Client(config, {});
This looks for a Client
type in the current module.
Changing this to use openweathermap:Client
openweathermap:Client myclient = check new openweathermap:Client(config, {});
or omitting Client
(which will result in the type being inferred from the expected type)
openweathermap:Client myclient = check new (config, {});
will result in successful compilation.
Yes that worked, thank you! Not sure if I should close this or leave it open?
Not sure if I should close this or leave it open?
Let's keep this open since the crash has to be fixed and the sample should result in a compilation error instead (e.g., unknown type 'Client'
).
Description
I'm getting the following error while compiling when trying out a very basic program. I get the same error when trying the
ballerinax/newsapi
package.Steps to Reproduce
Compile the following:
When removing the curly braces from
check new Client(config, {});
, I get a different error.Affected Version(s)
Ballerina 2201.8.0 (Swan Lake Update 8) Language specification 2023R1 Update Tool 1.4.0
OS, DB, other environment details and versions
Manjaro Linux
javac 20.0.2 openjdk 20.0.2 2023-07-18 OpenJDK Runtime Environment (build 20.0.2+9) OpenJDK 64-Bit Server VM (build 20.0.2+9, mixed mode, sharing)
Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response