summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_analyzer.cpp
AgeCommit message (Collapse)Author
2022-11-13GDScript compiler subclass bugfixesRune
2022-11-02Merge pull request #68125 from ↵Rémi Verschelde
kleonc/range-fix-single-arg-optimized-type-mismatch [GDScript] Fix type mismatch in optimized single arg `range`
2022-11-02Merge pull request #68040 from adamscott/fix-property-getter-return-typeRémi Verschelde
Fix property getter with custom return type
2022-11-02GDScript Fix type mismatch in optimized single arg `range`kleonc
2022-10-31Merge pull request #68065 from zCubed3/fix_min_max_crashRémi Verschelde
`GDScriptAnalyzer` Fix math utilities crashing when invalid args are passed
2022-10-31Merge pull request #62695 from Spartan322/relax-constant-assertsRémi Verschelde
Allow non-constant string message for assert
2022-10-30Fix math utility functions crashing when invalid args passedzCubed3
2022-10-29[godot#68001] Fix property getter with custom return typeAdam Scott
2022-10-16Clarified reason why a resource cannot be loaded.João Martins
2022-10-14Add STATIC_CALLED_ON_INSTANCE warning to highlightclayjohn
when static functions are called directly from objects
2022-10-13Implement RETURN_VALUE_DISCARDED warning in GDscriptclayjohn
2022-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-09-17Add GDScript resource export.willnationsdev
2022-09-15Fix GDScript `preload` fails in standalone build unless files are present in ↵Abdelhafidh Belalia
directory Fixes #56343.
2022-08-31Merge pull request #65065 from Atlinx/fix/65010_enum-doesnt-show-upRémi Verschelde
2022-08-30Fix inferred GDScript enum values not appearing in inspectorAtlinx
"enum_values" originally wasn't being forwarded to the new type inside "reduce_identifier_from_base", which caused hint strings derived from the new type to be blank, which ultimately caused an empty enum dropdown menu.
2022-08-29Rename String `plus_file` to `path_join`Aaron Franke
2022-08-07fix(gdscript): Infer type from preload constAntonio Dell'Annunziata
When resolving the type of the attribute from the variant, the result_type.kind was overritten for no reason. It is assumed that this only needs to be done, if the variant value is not valid to have any kind here. Solves #63715
2022-07-23Implement Vector4, Vector4i, Projectionreduz
Implement built-in classes Vector4, Vector4i and Projection. * Two versions of Vector4 (float and integer). * A Projection class, which is a 4x4 matrix specialized in projection types. These types have been requested for a long time, but given they were very corner case they were not added before. Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity. **Q**: Why Projection and not Matrix4? **A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-18Allow non-constant string message for assertGeorge L. Albany
2022-07-06Merge pull request #62760 from cdemirer/fix-annotation-initializer-conflictRémi Verschelde
Fix priority of annotated type vs initializer type
2022-07-06Fix priority of annotated type vs initializer typecdemirer
2022-07-05Add grouping annotations for class properties in GDScriptYuri Sizov
2022-06-27Add a const call mode to Object, Variant and Script.K. S. Ernest (iFire) Lee
For this to work safely (user not call queue_free or something in the expression), a const call mode was added to Object and Variant (and optionally Script). This mode ensures only const functions can be called, making it safe to use from the editor. Co-Authored-By: reduz <reduzio@gmail.com>
2022-06-17Make enum/constant binds 64-bit.bruvzg
2022-06-03use correct error for unused bind match, suppress with underscoreNathan Franke
2022-05-25Merge pull request #61279 from Trioct/fix-typed-array-assignmentRémi Verschelde
2022-05-25Fix const typed array assignmentTrioct
2022-05-24GDScript: Don't show redundant await warning on unknown typesGeorge Marques
Also avoid it when the type is known to be a signal.
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-05-12Add a new HashMap implementationreduz
Adds a new, cleaned up, HashMap implementation. * Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing). * Keeps elements in a double linked list for simpler, ordered, iteration. * Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much for performance vs keeping the key, but helps replace old code). * Uses a more modern C++ iterator API, deprecates the old one. * Supports custom allocator (in case there is a wish to use a paged one). This class aims to unify all the associative template usage and replace it by this one: * Map<> (whereas key order does not matter, which is 99% of cases) * HashMap<> * OrderedHashMap<> * OAHashMap<>
2022-04-27Merge pull request #60396 from vnen/gdscript-self-lambdaRémi Verschelde
2022-04-24GDScript: Allow using self in lambdasGeorge Marques
2022-04-19Fixes GDScript define nested dictionary and array as constants #50285PastMoments
2022-04-06GDScript: Add support for static method calls in native typesGeorge Marques
2022-03-31Fix typos with codespellRémi Verschelde
Using codespell 2.2-dev from current git. Fix a couple incorrect uses of gendered pronouns.
2022-03-30GDScript: Fix issues with completion and `super` callsGeorge Marques
- Make call errors use the call node instead of the calle, which will be empty on super calls. - Don't allow `super()` to be used within lambdas.
2022-03-22Prevent NARROWING_CONVERSION warning for int(float) function in GDScriptYuri Roubinsky
2022-03-22Merge pull request #59056 from Chaosus/gds_fix_extends_crashYuri Rubinsky
2022-03-14Fix default value count checking for inherited functionYuri Roubinsky
2022-03-12Prevent crash due to empty error message on empty extends in GDScriptYuri Roubinsky
2022-03-07Restore building web platform by enclosing resolve_function_signature.K. S. Ernest (iFire) Lee
2022-03-06GDScript: Check if method signature matches the parentGeorge Marques
To guarantee polymorphism, a method signature must be compatible with the parent. This checks if: 1. Return type is the same. 2. The subclass method takes at least the same amount of parameters. 3. The matching parameters have the same type. 4. If the subclass takes more parameters, all of the extra ones have a default value. 5. If the superclass has default values, so must have the subclass. There's a few test cases to ensure this holds up.
2022-03-04Merge pull request #58185 from V-Sekai/explicit_variant_assignment_fixRémi Verschelde
2022-03-04Merge pull request #58626 from groud/fix_gdscript_analyser_crashRémi Verschelde
2022-03-03Merge pull request #58262 from Sauermann/fix-range-docMax Hilbrunner
Describe usage of float in range documentation
2022-02-28Fix a crash in GDScriptAnalyzer when a script class's file is not foundGilles Roudière
2022-02-22Fixes cyclic detection from variables assigning themselves to themselves in ↵SaracenOne
autocomplete, and restricts initialization of variables from other variables which have not been declared above it in class body
2022-02-18Describe usage of float in range documentationMarkus Sauermann