Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
This commit is contained in:
commit
6409ae9ade
35
.github/workflows/buildandruntestslinux.yml
vendored
Normal file
35
.github/workflows/buildandruntestslinux.yml
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
name: Build & Run all tests on Ubuntu (release)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
release:
|
||||
types:
|
||||
- created
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
name: Prepare and build on Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build project in Release-mode, compile Pas-units, run tests
|
||||
run: ./_RebuildReleaseAndRunTests.sh
|
||||
timeout-minutes: 40
|
||||
env:
|
||||
PABCNET_BUILD_MODE: Release
|
||||
PABCNET_RUN_TESTS: false
|
||||
PABCNET_INC_BUILD: false
|
||||
PABCNET_VERBOSE: false
|
||||
|
||||
#- name: Publish artifacts (5/5)...
|
||||
# uses: actions/upload-artifact@v2
|
||||
# with:
|
||||
# name: All_distros
|
||||
# path: Release
|
||||
8
TestSuite/errors/err0411.pas
Normal file
8
TestSuite/errors/err0411.pas
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
type
|
||||
t1 = abstract class(System.Collections.IEnumerator)
|
||||
// Падает только если НЕ указать System.Collections
|
||||
public property IEnumerator.Current: object read nil;
|
||||
|
||||
end;
|
||||
|
||||
begin end.
|
||||
8
TestSuite/errors/err0412.pas
Normal file
8
TestSuite/errors/err0412.pas
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
type
|
||||
t1 = abstract class(System.Collections.IEnumerator)
|
||||
// Падает только если НЕ указать System.Collections
|
||||
public property System.Collections<integer>.IEnumerator.Current: object read nil;
|
||||
|
||||
end;
|
||||
|
||||
begin end.
|
||||
7
TestSuite/errors/err0413.pas
Normal file
7
TestSuite/errors/err0413.pas
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
type
|
||||
t1<T> = abstract class(System.Collections.Generic.IEnumerator<T>)
|
||||
public property IEnumerator<integer>.Current: integer read 2;
|
||||
|
||||
end;
|
||||
|
||||
begin end.
|
||||
8
TestSuite/errors/err0414.pas
Normal file
8
TestSuite/errors/err0414.pas
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
type
|
||||
t1 = abstract class(System.Collections.IEnumerator)
|
||||
|
||||
public property System.Collections.IEnumerator<integer>.Current: object read nil;
|
||||
|
||||
end;
|
||||
|
||||
begin end.
|
||||
26
TestSuite/explicitinterface12.pas
Normal file
26
TestSuite/explicitinterface12.pas
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
type
|
||||
t1<T> = class(System.Collections.Generic.IEnumerator<T>)
|
||||
|
||||
public property IEnumerator<T>.Current: T read T(object(2));
|
||||
public property System.Collections.IEnumerator.Current: object read 3;
|
||||
|
||||
public function System.Collections.IEnumerator.MoveNext: boolean;
|
||||
begin
|
||||
|
||||
end;
|
||||
public procedure System.Collections.IEnumerator.Reset;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
public procedure System.IDisposable.Dispose;
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
var obj := new t1<integer>;
|
||||
assert((obj as IEnumerator<integer>).Current = 2);
|
||||
assert(integer((obj as System.Collections.IEnumerator).Current) = 3);
|
||||
end.
|
||||
|
|
@ -4279,19 +4279,34 @@ namespace PascalABCCompiler.TreeConverter
|
|||
AddError(new NameCannotHaveGenericParameters(_simple_property.property_name.ln[i].name, get_location(_simple_property.property_name.ln[i])));
|
||||
|
||||
var ntr = new SyntaxTree.named_type_reference();
|
||||
if (_simple_property.property_name.ln[_simple_property.property_name.ln.Count - 1] is template_type_name)
|
||||
{
|
||||
template_type_reference ttr = new template_type_reference();
|
||||
ttr.params_list = new template_param_list();
|
||||
ttr.params_list.source_context = _simple_property.property_name.ln[_simple_property.property_name.ln.Count - 1].source_context;
|
||||
foreach (ident id in (_simple_property.property_name.ln[_simple_property.property_name.ln.Count - 1] as template_type_name).template_args.idents)
|
||||
ttr.params_list.params_list.Add(new named_type_reference(id.name, id.source_context));
|
||||
for (var i = 0; i < _simple_property.property_name.ln.Count; i++)
|
||||
{
|
||||
ntr.Add(_simple_property.property_name.ln[i]);
|
||||
}
|
||||
ttr.name = ntr;
|
||||
ttr.source_context = _simple_property.property_name.source_context;
|
||||
ntr = ttr;
|
||||
}
|
||||
else
|
||||
for (var i = 0; i < _simple_property.property_name.ln.Count; i++)
|
||||
{
|
||||
ntr.Add(new ident(_simple_property.property_name.ln[i].name+
|
||||
(_simple_property.property_name.ln[i] is template_type_name ? "`"+(_simple_property.property_name.ln[i] as template_type_name).template_args.Count :""), _simple_property.property_name.ln[i].source_context));
|
||||
|
||||
ntr.Add(_simple_property.property_name.ln[i]);
|
||||
}
|
||||
|
||||
type_node tn = find_type(ntr, get_location(_simple_property.property_name));
|
||||
|
||||
List<SymbolInfo> sil = context.find_definition_node(ntr, get_location(_simple_property.property_name), true);
|
||||
if (!(sil[0].sym_info as type_node).IsInterface)
|
||||
if (!tn.IsInterface)
|
||||
AddError(get_location(_simple_property.property_name), "EXPECTED_INTERFACE");
|
||||
name = (sil[0].sym_info as type_node).BaseFullName + "." + name;
|
||||
expl_interface = sil[0].sym_info as type_node;
|
||||
sil = expl_interface.find_in_type(_simple_property.property_name.name);
|
||||
name = tn.BaseFullName + "." + name;
|
||||
expl_interface = tn;
|
||||
List<SymbolInfo> sil = expl_interface.find_in_type(_simple_property.property_name.name);
|
||||
if (sil == null)
|
||||
AddError(new MemberIsNotDeclaredInType(_simple_property.property_name, get_location(_simple_property.property_name), expl_interface));
|
||||
if (!(sil[0].sym_info is property_node))
|
||||
|
|
|
|||
|
|
@ -16,28 +16,9 @@ export MONO_IOMAP=all
|
|||
cd ReleaseGenerators
|
||||
mono ../bin/pabcnetc.exe RebuildStandartModulesMono.pas /rebuild
|
||||
if [ $? -eq 0 ]; then
|
||||
cd PABCRtl
|
||||
mono ../../bin/pabcnetc.exe PABCRtl.pas /rebuild
|
||||
if [ $? -eq 0 ]; then
|
||||
sn -Vr PABCRtl.dll
|
||||
sn -R PABCRtl.dll KeyPair.snk
|
||||
sn -Vu PABCRtl.dll
|
||||
cp PABCRtl.dll ../../bin/Lib
|
||||
mono ../../bin/pabcnetc.exe PABCRtl32.pas /rebuild
|
||||
if [ $? -eq 0 ]; then
|
||||
sn -Vr PABCRtl32.dll
|
||||
sn -R PABCRtl32.dll KeyPair32.snk
|
||||
sn -Vu PABCRtl32.dll
|
||||
cp PABCRtl32.dll ../../bin/Lib
|
||||
sudo gacutil -u PABCRtl
|
||||
sudo gacutil -i ../../bin/Lib/PABCRtl.dll
|
||||
cd ..
|
||||
mono ../bin/pabcnetc.exe RebuildStandartModules.pas /rebuild
|
||||
if [ $? -eq 0 ]; then
|
||||
cd ../bin
|
||||
mono TestRunner.exe
|
||||
cd ..
|
||||
fi
|
||||
fi
|
||||
cd ../bin
|
||||
mono TestRunner.exe
|
||||
cd ..
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue