Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using keyword extension #11

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

using keyword extension #11

wants to merge 3 commits into from

Conversation

inky03
Copy link

@inky03 inky03 commented Dec 24, 2024

allows the static extension using keyword to be used for any class; also an attempt to improve its behavior

  • using the keyword will also import the class, as intended
  • prioritizes checking if a function exists on the object before checking if it exists in an extension
  • also adds a type check function to UsingEntry, helpful to enhance currently existing entries in allUsings and also to prevent the interpreter from failing if a function has a null return value (ex. using Lambda, <Iterable>.find returning null if it doesn't find a matching item)

i also updated the stringtools test asset to reflect some of these changes

@crowplexus crowplexus requested a review from NeeEoo December 24, 2024 04:01
@NeeEoo
Copy link
Collaborator

NeeEoo commented Dec 24, 2024

@crowplexus how do we change this to dev branch? Or is this synced with the latest version? Because my moved code we did isnt here

@NeeEoo
Copy link
Collaborator

NeeEoo commented Dec 24, 2024

Wait this is already dev branch

@NeeEoo
Copy link
Collaborator

NeeEoo commented Dec 24, 2024

Ohhh @crowplexus you forgot to push your local changes

@crowplexus
Copy link
Owner

Ohhh @crowplexus you forgot to push your local changes

I will push it soon

}),
new UsingEntry("Lambda", function(o: Dynamic, f: String, args: Array<Dynamic>): Dynamic {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had it as a string to allow people make custom usings,

but please do wait until we push our local changes

@crowplexus
Copy link
Owner

updated master and dev branches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants