Commit Graph

774 Commits

Author SHA1 Message Date
7f7d97f536 [Core] Expose approximate equality methods to GDScript 2019-04-25 13:20:29 -04:00
a342131eba Merge pull request #27673 from qarmin/small_fixes
Small fixes, mostly duplicated code
2019-04-22 12:00:34 +02:00
6af69f851a doc: Drop unused <demos> tag 2019-04-19 11:03:46 +02:00
14078fbb82 GDScript: add variable shadowing warning 2019-04-15 18:19:14 +02:00
e7a1fbe83a Merge pull request #27863 from bojidar-bg/27460-constant-class-clash
Check subclasses too when checking for name clashes
2019-04-12 11:54:35 +02:00
da65d54649 Merge pull request #27867 from bojidar-bg/27489-as-self-fail
Fix as operator generating opcode 38 errors
2019-04-11 23:23:35 +02:00
e56f5d5c91 GDScript: Don't allow built-in scripts to use class_name 2019-04-10 18:05:34 -03:00
07b76c0376 Merge pull request #27170 from timoschwarzer/allow-whitespaces-in-warning-ignore-comments
Allow whitespaces in warning-ignore comments
2019-04-10 18:16:10 +02:00
ece09f9872 Check for subclasses when checking for name clashes
Fixes #27460
2019-04-10 13:19:30 +03:00
f04f127680 Fix as operator generating opcode 38 errors
Closes #27489
Fixup of 466a76ac2c

Additionally, update `GDScriptCompiler` test to use Ref and to include `as` expressions.
2019-04-10 13:18:50 +03:00
c8994b56f9 Style: Apply new changes from clang-format 8.0
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
918de768a5 Merge pull request #27711 from neikeq/ifdef-clang-tidy
Replace a few #if/#elif with #ifdef and "#elif defined"
2019-04-08 12:24:30 +02:00
856a8226a5 Small fixes, mostly dupicated code 2019-04-08 11:03:37 +02:00
668bf1fd0d Merge pull request #27710 from Calinou/script-templates-typed-gdscript
Add support for type hints in non-default script editor templates
2019-04-08 10:13:59 +02:00
d211aff777 Merge pull request #27231 from Chaosus/smoothstep
Added smoothstep built-in function
2019-04-08 10:03:42 +02:00
514a3fb96a Added smoothstep built-in function 2019-04-07 14:11:26 +03:00
ad2127a3e8 Replace a few #if/#elif with #ifdef and "#elif defined" 2019-04-05 23:41:51 +02:00
00799fc8c2 Add support for type hints in non-default script editor templates
This also refactors template processing to avoid repetition.

This closes #27074.
2019-04-05 23:19:30 +02:00
fc370b3feb Fix -Wimplicit-fallthrough warnings from GCC 8
Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional.
Can be replaced by `[[fallthrough]]` if/when we switch to C++17.

The warning is now enabled by default for GCC on `extra` warnings level
(part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet,
but we could enable it manually once we switch to C++11. There's no
equivalent feature in MSVC for now.

Fixes #26135.
2019-04-05 15:14:53 +02:00
e3bd84fa57 Merge pull request #27485 from Faless/io/encode_decode_safety_pr
Safer encode/decode variant.
2019-04-01 17:00:40 +02:00
393e62b98a Add object encoding param to serialization methods
Network peers get_var/put_var
File get_var/store_var
GDScript/Mono/VisualScript bytes2var/var2bytes
Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding.

Break ABI compatibaility (API compatibility for GDNative).
2019-04-01 15:53:19 +02:00
39c868171e doc: Bump version to 3.2 2019-04-01 12:33:56 +02:00
4ec384f9d4 Merge pull request #26097 from danielspaniol/25955-wrong-unreachable-warning-after-returning-from-matchs-wildcard-pattern
Fix: Wrong unreachable warning after returning from match's wildcard pattern #25955
2019-04-01 12:17:17 +02:00
492153878f Merge pull request #27128 from bojidar-bg/27111-gdscript-confounding-class
Fix GDScriptCompiler bugging out with identically-named inner class
2019-03-27 16:57:04 +01:00
7a0dfc04aa Allow whitespaces in warning-ignore comments 2019-03-17 18:42:59 +01:00
466a76ac2c Fix GDScriptCompiler bugging out with identically-named inner class
Fixes #27111
2019-03-16 20:41:16 +02:00
b64f9f03f8 Fix duplicated lines in GDScript bytecode
Fixes #26789
2019-03-14 18:38:07 +02:00
5a574a4f29 Fix typo in GDScript narrowing conversion warning message
This closes #26790.
2019-03-08 14:28:33 +01:00
9637e42705 Fix enums coming from other classes without preload
Fix #19704, fix #26001
2019-03-05 23:19:02 +02:00
b63c506ad8 Close file handles after use of new get_as_utf8_strings, fixes #26578 2019-03-04 09:53:02 -03:00
425ec6914c Revert "Forbid implicit type conversion in GDScript" 2019-03-04 12:25:59 +01:00
7889e9b7ca Merge pull request #26562 from vnen/gdscript-no-implicit-cast
Forbid implicit type conversion in GDScript
2019-03-04 10:19:00 +01:00
67fee40483 GDScript: Fix issue when detecting file class in inner class 2019-03-03 22:53:50 -03:00
d0b08342b8 GDScript: Forbid implicit type conversion
Since types are not present in release builds, this could cause issues
where a variable does not have the exact defined type.
2019-03-03 22:25:22 -03:00
b24cb92240 GDScript: Allow for iterator to be rededefined 2019-03-03 21:39:42 -03:00
a9fe834a8e Merge pull request #26547 from vnen/gdscript-dependency-parse
Add a parse mode for GDScript which doesn't load dependencies
2019-03-03 18:00:12 -03:00
bda60bfa29 Add a dependency search mode for GDScript parser
- This mode avoids loading any other resource.
- Search for class_name now uses this mode, to avoid loading in the scan
thread.
- Implement get_dependencies() for GDScript loader, now exporting
dependencies only should include the preloaded resources.
2019-03-03 16:51:54 -03:00
9db96d9f81 Merge pull request #26528 from bojidar-bg/26047-gdscript-object-argument
Allow parameters passed to GDScript functions to be nulled
2019-03-03 11:39:25 -03:00
f0efc7521e Allow parameters passed to GDScript functions to be nulled
Previous version resulted in confusing (but actually right) errors about converting "from Object to Object", since CallError
does not include information about the actual types involved.
2019-03-03 15:24:06 +02:00
f207b2fe0e Fix GDScript checking for assigning to a constant only in release 2019-03-03 12:36:27 +02:00
f2003b1a7e Merge pull request #26034 from QbieShay/issue_25596
Inheriting from virtual class no longer causes the engine to crash.
2019-02-28 11:00:20 +01:00
8f22c2684f Inheriting from virtual class no longer causes the engine to crash, it prints an error instead.
Co-authored-by: Hein-Pieter van Braam <hp@tmm.cx>
2019-02-27 20:42:20 +01:00
426a6fdc17 Merge pull request #26134 from marxin/fix-Wsign-compare
Fix -Wsign-compare warnings.
2019-02-27 09:22:47 +01:00
e5f665c718 Fix -Wsign-compare warnings.
I decided to modify code in a defensive way. Ideally functions
like size() or length() should return an unsigned type.
2019-02-27 07:45:57 +01:00
db7864c1fd Fix GDScript exports having the wrong type of default value by converting it
Also, initialize elements of PoolArrays when resizing them in the editor.
Fixes #26066.
2019-02-26 14:58:39 +02:00
755c690252 Merge pull request #25018 from AllanDaemon/#24895
Fix support for optional parameters in setters
2019-02-24 10:45:50 -03:00
726f31e992 Merge pull request #26132 from marxin/fix-Wignored-qualifiers
Fix warnings seen with -Wignored-qualifiers.
2019-02-22 09:55:27 +01:00
60fe9321ac Merge pull request #26099 from marxin/fix-Wtype-limits-warnings
Fix all -Wtype-limits warnings.
2019-02-22 09:44:59 +01:00
d13ac2a413 Request to use load when cyclic reference is found, closes #26119 2019-02-21 17:27:07 -03:00
c11e7ffd0e Fix warnings seen with -Wignored-qualifiers. 2019-02-21 20:24:29 +01:00