mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Merge branch 'master' of https://github.com/odin-lang/Odin
This commit is contained in:
@@ -38,6 +38,10 @@ jobs:
|
|||||||
cd tests/vendor
|
cd tests/vendor
|
||||||
make
|
make
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
- name: Odin issues tests
|
||||||
|
run: |
|
||||||
|
cd tests/issues
|
||||||
|
./run.sh
|
||||||
- name: Odin check examples/all for Linux i386
|
- name: Odin check examples/all for Linux i386
|
||||||
run: ./odin check examples/all -vet -strict-style -target:linux_i386
|
run: ./odin check examples/all -vet -strict-style -target:linux_i386
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
@@ -151,6 +155,10 @@ jobs:
|
|||||||
cd tests\vendor
|
cd tests\vendor
|
||||||
call build.bat
|
call build.bat
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
- name: Odin issues tests
|
||||||
|
run: |
|
||||||
|
cd tests/issues
|
||||||
|
./run.bat
|
||||||
- name: core:math/big tests
|
- name: core:math/big tests
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -293,6 +293,7 @@ LLVMMetadataRef lb_debug_type_internal(lbModule *m, Type *type) {
|
|||||||
case Type_Named:
|
case Type_Named:
|
||||||
GB_PANIC("Type_Named should be handled in lb_debug_type separately");
|
GB_PANIC("Type_Named should be handled in lb_debug_type separately");
|
||||||
|
|
||||||
|
case Type_SoaPointer:
|
||||||
case Type_Pointer:
|
case Type_Pointer:
|
||||||
return LLVMDIBuilderCreatePointerType(m->debug_builder, lb_debug_type(m, type->Pointer.elem), word_bits, word_bits, 0, nullptr, 0);
|
return LLVMDIBuilderCreatePointerType(m->debug_builder, lb_debug_type(m, type->Pointer.elem), word_bits, word_bits, 0, nullptr, 0);
|
||||||
case Type_MultiPointer:
|
case Type_MultiPointer:
|
||||||
|
|||||||
+12
-4
@@ -1,15 +1,23 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
if not exist "build\" mkdir build
|
if not exist "build\" mkdir build
|
||||||
|
pushd build
|
||||||
|
|
||||||
set COMMON=-collection:tests=..
|
set COMMON=-collection:tests=..\..
|
||||||
|
|
||||||
|
set ERROR_DID_OCCUR=0
|
||||||
|
|
||||||
@echo on
|
@echo on
|
||||||
|
|
||||||
..\..\odin test test_issue_829.odin %COMMON% -file
|
..\..\..\odin test ..\test_issue_829.odin %COMMON% -file
|
||||||
..\..\odin test test_issue_1592.odin %COMMON% -file
|
..\..\..\odin test ..\test_issue_1592.odin %COMMON% -file
|
||||||
..\..\odin test test_issue_2087.odin %COMMON% -file
|
..\..\..\odin test ..\test_issue_2087.odin %COMMON% -file
|
||||||
|
..\..\..\odin build ..\test_issue_2113.odin %COMMON% -file -debug
|
||||||
|
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
if %ERRORLEVEL% NEQ 0 set ERROR_DID_OCCUR=1
|
||||||
|
|
||||||
|
popd
|
||||||
rmdir /S /Q build
|
rmdir /S /Q build
|
||||||
|
if %ERROR_DID_OCCUR% NEQ 0 EXIT /B 1
|
||||||
|
|||||||
+8
-5
@@ -2,15 +2,18 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
ODIN=../../odin
|
pushd build
|
||||||
COMMON="-collection:tests=.."
|
ODIN=../../../odin
|
||||||
|
COMMON="-collection:tests=../.."
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
$ODIN test test_issue_829.odin $COMMON -file
|
$ODIN test ../test_issue_829.odin $COMMON -file
|
||||||
$ODIN test test_issue_1592.odin $COMMON -file
|
$ODIN test ../test_issue_1592.odin $COMMON -file
|
||||||
$ODIN test test_issue_2087.odin $COMMON -file
|
$ODIN test ../test_issue_2087.odin $COMMON -file
|
||||||
|
$ODIN build ../test_issue_2113.odin $COMMON -file -debug
|
||||||
|
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
|
popd
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
// Tests issue #2113 https://github.com/odin-lang/Odin/issues/2113
|
||||||
|
// Causes a panic on compilation
|
||||||
|
package test_issues
|
||||||
|
|
||||||
|
T :: struct {
|
||||||
|
a: int,
|
||||||
|
}
|
||||||
|
|
||||||
|
main :: proc() {
|
||||||
|
array: #soa[1]T
|
||||||
|
a := &array[0]
|
||||||
|
_ = a
|
||||||
|
}
|
||||||
+3
-3
@@ -11,7 +11,7 @@ ActivationPolicy :: enum UInteger {
|
|||||||
ApplicationDelegate :: struct {
|
ApplicationDelegate :: struct {
|
||||||
willFinishLaunching: proc "c" (self: ^ApplicationDelegate, notification: ^Notification),
|
willFinishLaunching: proc "c" (self: ^ApplicationDelegate, notification: ^Notification),
|
||||||
didFinishLaunching: proc "c" (self: ^ApplicationDelegate, notification: ^Notification),
|
didFinishLaunching: proc "c" (self: ^ApplicationDelegate, notification: ^Notification),
|
||||||
shouldTerminateAfterLastWindowClosed: proc "c" (self: ^ApplicationDelegate, sender: ^Application),
|
shouldTerminateAfterLastWindowClosed: proc "c" (self: ^ApplicationDelegate, sender: ^Application) -> BOOL,
|
||||||
|
|
||||||
user_data: rawptr,
|
user_data: rawptr,
|
||||||
}
|
}
|
||||||
@@ -34,9 +34,9 @@ Application_setDelegate :: proc(self: ^Application, delegate: ^ApplicationDelega
|
|||||||
del := (^ApplicationDelegate)(self->pointerValue())
|
del := (^ApplicationDelegate)(self->pointerValue())
|
||||||
del->didFinishLaunching(notification)
|
del->didFinishLaunching(notification)
|
||||||
}
|
}
|
||||||
shouldTerminateAfterLastWindowClosed :: proc "c" (self: ^Value, _: SEL, application: ^Application) {
|
shouldTerminateAfterLastWindowClosed :: proc "c" (self: ^Value, _: SEL, application: ^Application) -> BOOL {
|
||||||
del := (^ApplicationDelegate)(self->pointerValue())
|
del := (^ApplicationDelegate)(self->pointerValue())
|
||||||
del->shouldTerminateAfterLastWindowClosed(application)
|
return del->shouldTerminateAfterLastWindowClosed(application)
|
||||||
}
|
}
|
||||||
|
|
||||||
wrapper := Value.valueWithPointer(delegate)
|
wrapper := Value.valueWithPointer(delegate)
|
||||||
|
|||||||
Reference in New Issue
Block a user